Package org.apache.hadoop.hbase.types
Class RawBytesTerminated
java.lang.Object
org.apache.hadoop.hbase.types.TerminatedWrapper<byte[]>
org.apache.hadoop.hbase.types.RawBytesTerminated
- All Implemented Interfaces:
DataType<byte[]>
An
DataType that encodes variable-length values encoded using
Bytes.putBytes(byte[], int, byte[], int, int). Includes a
termination marker following the raw byte[] value. Intended to make it easier to
transition away from direct use of Bytes.-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.types.TerminatedWrapper
term, wrapped -
Constructor Summary
ConstructorsConstructorDescriptionRawBytesTerminated(byte[] term) Create aRawBytesTerminatedusing the specified terminator.RawBytesTerminated(String term) Create aRawBytesTerminatedusing the specified terminator.RawBytesTerminated(Order order, byte[] term) Create aRawBytesTerminatedusing the specified terminator andorder.RawBytesTerminated(Order order, String term) Create aRawBytesTerminatedusing the specified terminator andorder. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decode(PositionedByteRange src, int length) Read abyte[]from the buffersrc.intencode(PositionedByteRange dst, byte[] val, int voff, int vlen) Writevalintodst, respectingoffsetandlength.Methods inherited from class org.apache.hadoop.hbase.types.TerminatedWrapper
decode, encode, encodedClass, encodedLength, getOrder, isNullable, isOrderPreserving, isSkippable, skip, terminatorPosition
-
Constructor Details
-
RawBytesTerminated
Create aRawBytesTerminatedusing the specified terminator andorder.- Throws:
IllegalArgumentException- iftermisnullor empty.
-
RawBytesTerminated
Create aRawBytesTerminatedusing the specified terminator andorder.- Throws:
IllegalArgumentException- iftermisnullor empty.
-
RawBytesTerminated
Create aRawBytesTerminatedusing the specified terminator.- Throws:
IllegalArgumentException- iftermisnullor empty.
-
RawBytesTerminated
Create aRawBytesTerminatedusing the specified terminator.- Throws:
IllegalArgumentException- iftermisnullor empty.
-
-
Method Details
-
decode
Read abyte[]from the buffersrc. -
encode
Writevalintodst, respectingoffsetandlength.- Returns:
- number of bytes written.
-