public class ByteArrayView extends Object implements Cloneable
| Constructor and Description | 
|---|
| ByteArrayView(byte[] array)Create a view on the entirety of the given array. | 
| ByteArrayView(byte[] array,
             int l,
             int r)Create a view on the given array from l (inclusive) to 
 r (exclusive). | 
| ByteArrayView(int n)Create a view on an array of length n. | 
| Modifier and Type | Method and Description | 
|---|---|
| ByteArrayView | clone() | 
| byte | get(int i)Get the ith element of this array view. | 
| byte | getFast(int i)Get the ith element of this array view omitting any
 bounds checks. | 
| byte[] | getUnderlyingStorage()Get access to the underlying array of this view. | 
| void | set(int i,
   byte v)Set the ith element of this array view to the value v. | 
| void | setFast(int i,
       byte v)Set the ith element of this array view to the value v. | 
| int | size()Get the size (number of elements) in the view. | 
| ByteArrayView | subView(int l1,
       int r1)Get a subview of this view from l1 (inclusive) to r1 (exclusive). | 
| byte[] | toArray()Convert this view to an array. | 
| String | toString() | 
public ByteArrayView(byte[] array, int l, int r)
array - the arrayl - start (left) indexr - end (right) indexpublic ByteArrayView(byte[] array)
array - the array.public ByteArrayView(int n)
n - the length of the view and underlying array.public ByteArrayView subView(int l1, int r1)
l1 - start (left) indexr1 - end (right) indexpublic byte get(int i)
i - the index to getpublic byte getFast(int i)
i - the index to getpublic void set(int i, byte v)
i - the index to setv - the value to setpublic void setFast(int i, byte v)
i - the index to setv - the value to setpublic byte[] getUnderlyingStorage()
public int size()
public byte[] toArray()
public ByteArrayView clone()