public class WrappedByteArray extends java.lang.Object implements WrappedBytes
| Modifier and Type | Class and Description |
|---|---|
static class |
WrappedByteArray.Externalizer |
| Modifier and Type | Field and Description |
|---|---|
static WrappedByteArray |
EMPTY_BYTES |
| Constructor and Description |
|---|
WrappedByteArray(byte[] bytes) |
WrappedByteArray(byte[] bytes,
int hashCode) |
| Modifier and Type | Method and Description |
|---|---|
int |
backArrayOffset()
The offset of where data starts in the backed array.
|
boolean |
equals(java.lang.Object o) |
boolean |
equalsWrappedBytes(WrappedBytes other) |
byte |
getByte(int offset)
Retrieves the byte given an offset.
|
byte[] |
getBytes()
The backing array if there is one otherwise null is returned.
|
int |
getLength()
The length of the underlying wrapped bytes.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final WrappedByteArray EMPTY_BYTES
public WrappedByteArray(byte[] bytes)
public WrappedByteArray(byte[] bytes,
int hashCode)
public byte[] getBytes()
WrappedBytesWrappedBytes.backArrayOffset() to know where to read the bytes from. This byte[] should never be modified
by the callergetBytes in interface WrappedBytespublic int backArrayOffset()
WrappedBytesbackArrayOffset in interface WrappedBytespublic int getLength()
WrappedBytesgetLength in interface WrappedBytespublic byte getByte(int offset)
WrappedBytesWrappedBytes.getLength().getByte in interface WrappedBytesoffset - the offset of where to find the bytepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean equalsWrappedBytes(WrappedBytes other)
equalsWrappedBytes in interface WrappedBytespublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object