org.apache.hadoop.hbase.types
Class RawBytesFixedLength

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

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class RawBytesFixedLength
extends FixedLengthWrapper<byte[]>

An DataType that encodes fixed-length values encoded using Bytes.putBytes(byte[], int, byte[], int, int). Intended to make it easier to transition away from direct use of Bytes.

See Also:
Bytes.putBytes(byte[], int, byte[], int, int), RawBytes, OrderedBlob, OrderedBlobVar

Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.types.FixedLengthWrapper
base, length
 
Constructor Summary
RawBytesFixedLength(int length)
          Create a RawBytesFixedLength of the specified length.
RawBytesFixedLength(Order order, int length)
          Create a RawBytesFixedLength using the specified order and length.
 
Method Summary
 byte[] decode(PositionedByteRange src, int length)
          Read a byte[] from the buffer src.
 int encode(PositionedByteRange dst, byte[] val, int voff, int vlen)
          Write val into buff, respecting offset and length.
 
Methods inherited from class org.apache.hadoop.hbase.types.FixedLengthWrapper
decode, encode, encodedClass, encodedLength, getLength, getOrder, isNullable, isOrderPreserving, isSkippable, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawBytesFixedLength

public RawBytesFixedLength(Order order,
                           int length)
Create a RawBytesFixedLength using the specified order and length.


RawBytesFixedLength

public RawBytesFixedLength(int length)
Create a RawBytesFixedLength of the specified length.

Method Detail

decode

public byte[] decode(PositionedByteRange src,
                     int length)
Read a byte[] from the buffer src.


encode

public int encode(PositionedByteRange dst,
                  byte[] val,
                  int voff,
                  int vlen)
Write val into buff, respecting offset and length.



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