Class BigIntegerLexicoder

java.lang.Object
org.apache.accumulo.core.client.lexicoder.AbstractEncoder<T>
org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder<BigInteger>
org.apache.accumulo.core.client.lexicoder.BigIntegerLexicoder
All Implemented Interfaces:
Encoder<BigInteger>, Lexicoder<BigInteger>, org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder<BigInteger>

public class BigIntegerLexicoder extends org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder<BigInteger>
A lexicoder to encode/decode a BigInteger to/from bytes that maintain its native Java sort order.
Since:
1.6.0
  • Constructor Details

    • BigIntegerLexicoder

      public BigIntegerLexicoder()
  • Method Details

    • encode

      public byte[] encode(BigInteger v)
    • decode

      public BigInteger decode(byte[] b)
      Specified by:
      decode in interface org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder<BigInteger>
      Overrides:
      decode in class AbstractEncoder<BigInteger>
    • decodeUnchecked

      protected BigInteger decodeUnchecked(byte[] b, int offset, int origLen) throws org.apache.accumulo.core.iterators.ValueFormatException
      Description copied from class: AbstractEncoder
      Decodes a byte array without checking if the offset and len exceed the bounds of the actual array.
      Specified by:
      decodeUnchecked in class AbstractEncoder<BigInteger>
      Throws:
      org.apache.accumulo.core.iterators.ValueFormatException