Class DateLexicoder

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

public class DateLexicoder extends org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder<Date>
A lexicoder for date objects. It preserves the native Java sort order for Date.
Since:
1.6.0
  • Constructor Details

    • DateLexicoder

      public DateLexicoder()
  • Method Details

    • encode

      public byte[] encode(Date data)
    • decode

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

      protected Date decodeUnchecked(byte[] data, int offset, int len)
      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<Date>