|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.file.tfile.ByteArray
public final class ByteArray
Adaptor class to wrap byte-array backed objects (including java byte array) as RawComparable objects.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArray(BytesWritable other)
BytesWritable.
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.| Method Detail |
|---|
public byte[] buffer()
RawComparable
buffer in interface RawComparablepublic int offset()
RawComparable
offset in interface RawComparablepublic int size()
RawComparable
size in interface RawComparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||