public class WrappedByteArray extends Object implements WrappedBytes
| 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(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() |
String |
toString() |
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 equalsWrappedBytes(WrappedBytes other)
equalsWrappedBytes in interface WrappedBytesCopyright © 2017 JBoss, a division of Red Hat. All rights reserved.