org.apache.hadoop.hbase.types
Class OrderedString
java.lang.Object
org.apache.hadoop.hbase.types.OrderedBytesBase<String>
org.apache.hadoop.hbase.types.OrderedString
- All Implemented Interfaces:
- DataType<String>
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class OrderedString
- extends OrderedBytesBase<String>
A String of variable-length. Built on
OrderedBytes.encodeString(PositionedByteRange, String, Order).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASCENDING
public static final OrderedString ASCENDING
DESCENDING
public static final OrderedString DESCENDING
OrderedString
protected OrderedString(Order order)
encodedLength
public int encodedLength(String val)
- Description copied from interface:
DataType
- Inform consumers how long the encoded
byte[] will be.
- Parameters:
val - The value to check.
- Returns:
- the number of bytes required to encode
val.a
encodedClass
public Class<String> encodedClass()
- Description copied from interface:
DataType
- Inform consumers over what type this
DataType operates. Useful
when working with bare DataType instances.
decode
public String decode(PositionedByteRange src)
- Description copied from interface:
DataType
- Read an instance of
T from the buffer src.
- Parameters:
src - the buffer containing the encoded value.
encode
public int encode(PositionedByteRange dst,
String val)
- Description copied from interface:
DataType
- Write instance
val into buffer dst.
- Parameters:
dst - the buffer containing the encoded value.val - the value to encode onto dst.
- Returns:
- number of bytes written.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.