RawComparable@Private @Unstable public final class ByteArray extends java.lang.Object implements RawComparable
| Constructor | Description |
|---|---|
ByteArray(byte[] buffer) |
Wrap a whole byte array as a RawComparable.
|
ByteArray(byte[] buffer,
int offset,
int len) |
Wrap a partial byte array as a RawComparable.
|
ByteArray(BytesWritable other) |
Constructing a ByteArray from a
BytesWritable. |
| Modifier and Type | Method | Description |
|---|---|---|
byte[] |
buffer() |
Get the underlying byte array.
|
int |
offset() |
Get the offset of the first byte in the byte array.
|
int |
size() |
Get the size of the byte range in the byte array.
|
public ByteArray(BytesWritable other)
BytesWritable.other - other.public ByteArray(byte[] buffer)
buffer - the byte array buffer.public ByteArray(byte[] buffer,
int offset,
int len)
buffer - the byte array buffer.offset - the starting offsetlen - the length of the consecutive bytes to be wrapped.public byte[] buffer()
RawComparablebuffer in interface RawComparablepublic int offset()
RawComparableoffset in interface RawComparablepublic int size()
RawComparablesize in interface RawComparableCopyright © 2008–2025 Apache Software Foundation. All rights reserved.