public interface ArrayView
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array()
Gets a reference to the backing array for this ArrayView.
|
int |
arrayOffset()
Gets a value indicating the offset in the backing array where this ArrayView starts at.
|
void |
copyTo(byte[] target,
int targetOffset,
int length)
Copies a specified number of bytes from this ArrayView into the given target array.
|
byte |
get(int index)
Gets the value at the specified index.
|
byte[] |
getCopy()
Returns a copy of the contents of this ArrayView.
|
int |
getLength()
Gets a value representing the length of this ArrayView.
|
java.io.InputStream |
getReader()
Creates an InputStream that can be used to read the contents of this ArrayView.
|
java.io.InputStream |
getReader(int offset,
int length)
Creates an InputStream that can be used to read the contents of this ArrayView.
|
byte get(int index)
index - The index to query.java.lang.ArrayIndexOutOfBoundsException - If index is invalid.int getLength()
byte[] array()
int arrayOffset()
java.io.InputStream getReader()
java.io.InputStream getReader(int offset,
int length)
offset - The starting offset of the section to read.length - The length of the section to read.void copyTo(byte[] target,
int targetOffset,
int length)
target - The target array.targetOffset - The offset within the target array to start copying data at.length - The number of bytes to copy.java.lang.ArrayIndexOutOfBoundsException - If targetOffset or length are invalid.byte[] getCopy()