public class ReadOnlyByteArray extends Object
Constructor and Description |
---|
ReadOnlyByteArray(byte[] array)
Creates a new instance based on the given array.
|
Modifier and Type | Method and Description |
---|---|
byte |
get(int index)
Gets the element at the given index.
|
int |
length()
Returns the length of the array.
|
public ReadOnlyByteArray(byte[] array)
array
- Array to provide read-only access to. The array will not be copied by this class.public int length()
public byte get(int index)
index
- The index to get the element at.IndexOutOfBoundsException
- if the index is < 0 or > length()Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.