org.apache.hadoop.hbase.types
Class OrderedBlobVar

java.lang.Object
  extended by org.apache.hadoop.hbase.types.OrderedBytesBase<byte[]>
      extended by org.apache.hadoop.hbase.types.OrderedBlobVar
All Implemented Interfaces:
DataType<byte[]>

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class OrderedBlobVar
extends OrderedBytesBase<byte[]>

An alternative to OrderedBlob for use by Struct fields that do not terminate the fields list. Built on OrderedBytes.encodeBlobVar(PositionedByteRange, byte[], int, int, Order).


Field Summary
static OrderedBlobVar ASCENDING
           
static OrderedBlobVar DESCENDING
           
 
Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order
 
Constructor Summary
protected OrderedBlobVar(Order order)
           
 
Method Summary
 byte[] decode(PositionedByteRange src)
          Read an instance of T from the buffer src.
 int encode(PositionedByteRange dst, byte[] val)
          Write instance val into buffer dst.
 int encode(PositionedByteRange dst, byte[] val, int voff, int vlen)
          Write a subset of val to buff.
 Class<byte[]> encodedClass()
          Inform consumers over what type this DataType operates.
 int encodedLength(byte[] val)
          Inform consumers how long the encoded byte[] will be.
 
Methods inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
getOrder, isNullable, isOrderPreserving, isSkippable, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final OrderedBlobVar ASCENDING

DESCENDING

public static final OrderedBlobVar DESCENDING
Constructor Detail

OrderedBlobVar

protected OrderedBlobVar(Order order)
Method Detail

encodedLength

public int encodedLength(byte[] 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<byte[]> encodedClass()
Description copied from interface: DataType
Inform consumers over what type this DataType operates. Useful when working with bare DataType instances.


decode

public byte[] 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,
                  byte[] 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.

encode

public int encode(PositionedByteRange dst,
                  byte[] val,
                  int voff,
                  int vlen)
Write a subset of val to buff.



Copyright © 2013 The Apache Software Foundation. All Rights Reserved.