|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.ReadOnlyByteArray
public class ReadOnlyByteArray
Implements access to an array in a read-only fashion.
Constructor Summary | |
---|---|
ReadOnlyByteArray(byte[] array)
Creates a new instance based on the given array. |
Method Summary | |
---|---|
byte |
get(int index)
Gets the element at the given index. |
int |
length()
Returns the length of the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReadOnlyByteArray(byte[] array)
array
- Array to provide read-only access to. The array will
not be copied by this class.Method Detail |
---|
public int length()
public byte get(int index)
index
- The index to get the element at.
java.lang.IndexOutOfBoundsException
- if the index is < 0 or > length()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |