public final class ByteArray
extends java.lang.Object
This class also allows the trio of array, offset and length to be carried around as a single object.
Modifier and Type | Field and Description |
---|---|
private byte[] |
array |
private int |
length |
private int |
offset |
Constructor and Description |
---|
ByteArray() |
ByteArray(byte[] array) |
ByteArray(byte[] array,
int offset,
int length)
Create an instance of this class that wraps ths given array.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
equals(byte[] a,
int aOffset,
int aLength,
byte[] b,
int bOffset,
int bLength)
Compare two byte arrays using value equality.
|
boolean |
equals(java.lang.Object other)
Value equality for byte arrays.
|
byte[] |
getArray() |
int |
getLength() |
int |
getOffset() |
int |
hashCode() |
void |
readExternal(java.io.ObjectInput in)
Read this object from a stream of stored objects.
|
void |
setBytes(byte[] array) |
void |
setBytes(byte[] array,
int length) |
void |
setBytes(byte[] array,
int offset,
int length) |
void |
setLength(int newLength) |
void |
writeExternal(java.io.ObjectOutput out)
Write the byte array out w/o compression
|
public ByteArray(byte[] array, int offset, int length)
public ByteArray(byte[] array)
public ByteArray()
public void setBytes(byte[] array)
public void setBytes(byte[] array, int length)
public void setBytes(byte[] array, int offset, int length)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final byte[] getArray()
public final int getOffset()
public final int getLength()
public final void setLength(int newLength)
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
in
- read this.java.io.IOException
- thrown on errorpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
out
- write bytes here.java.io.IOException
- thrown on errorprivate static boolean equals(byte[] a, int aOffset, int aLength, byte[] b, int bOffset, int bLength)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.