| java.lang.Object org.apache.derby.iapi.util.ByteArray
ByteArray | final public class ByteArray (Code) | | ByteArray wraps java byte arrays (byte[]) to allow
byte arrays to be used as keys in hashtables.
This is required because the equals function on
byte[] directly uses reference equality.
This class also allows the trio of array, offset and length
to be carried around as a single object.
|
Constructor Summary | |
public | ByteArray(byte[] array, int offset, int length) Create an instance of this class that wraps ths given array. | public | ByteArray(byte[] array) | public | ByteArray() |
ByteArray | public ByteArray(byte[] array, int offset, int length)(Code) | | Create an instance of this class that wraps ths given array.
This class does not make a copy of the array, it just saves
the reference.
|
ByteArray | public ByteArray(byte[] array)(Code) | | |
ByteArray | public ByteArray()(Code) | | |
equals | public boolean equals(Object other)(Code) | | Value equality for byte arrays.
|
getArray | final public byte[] getArray()(Code) | | |
getLength | final public int getLength()(Code) | | |
getOffset | final public int getOffset()(Code) | | |
hashCode | public int hashCode()(Code) | | |
readExternal | public void readExternal(ObjectInput in) throws IOException(Code) | | Read this object from a stream of stored objects.
Parameters: in - read this. exception: IOException - thrown on error |
setBytes | public void setBytes(byte[] array)(Code) | | |
setBytes | public void setBytes(byte[] array, int length)(Code) | | |
setBytes | public void setBytes(byte[] array, int offset, int length)(Code) | | |
setLength | final public void setLength(int newLength)(Code) | | |
|
|