@ProtoTypeId(value=1) public class WrappedByteArray extends 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(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 static final WrappedByteArray EMPTY_BYTES
@ProtoFactory public WrappedByteArray(byte[] bytes)
public WrappedByteArray(byte[] bytes, int hashCode)
@ProtoField(number=1) public byte[] getBytes()
WrappedBytes
WrappedBytes.backArrayOffset()
to know where to read the bytes from. This byte[] should never be modified
by the callergetBytes
in interface WrappedBytes
public int backArrayOffset()
WrappedBytes
backArrayOffset
in interface WrappedBytes
public int getLength()
WrappedBytes
getLength
in interface WrappedBytes
public byte getByte(int offset)
WrappedBytes
WrappedBytes.getLength()
.getByte
in interface WrappedBytes
offset
- the offset of where to find the bytepublic boolean equalsWrappedBytes(WrappedBytes other)
equalsWrappedBytes
in interface WrappedBytes
Copyright © 2021 JBoss by Red Hat. All rights reserved.