Class OrderedBlobVar

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

@Public 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 Details

  • Constructor Details

  • Method Details

    • 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 dst.
      Parameters:
      dst - the PositionedByteRange to write to
      val - the value to write to dst
      voff - the offset in dst where to write val to
      vlen - the lenght of val
      Returns:
      the number of bytes written