Class StringLexicoder

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

public class StringLexicoder extends org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder<String>
This lexicoder encodes/decodes a given String to/from bytes without further processing. It can be combined with other encoders like the ReverseLexicoder to flip the default sort order.
Since:
1.6.0
  • Constructor Details

    • StringLexicoder

      public StringLexicoder()
  • Method Details

    • encode

      public byte[] encode(String data)
    • decode

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

      protected String 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<String>