org.apache.gora.accumulo.encoders
Class HexEncoder

java.lang.Object
  extended by org.apache.gora.accumulo.encoders.HexEncoder
All Implemented Interfaces:
Encoder

public class HexEncoder
extends Object
implements Encoder

Encodes data in a ascii hex representation


Constructor Summary
HexEncoder()
           
 
Method Summary
 boolean decodeBoolean(byte[] val)
           
 byte decodeByte(byte[] a)
           
 double decodeDouble(byte[] a)
           
 float decodeFloat(byte[] a)
           
 int decodeInt(byte[] a)
           
 long decodeLong(byte[] a)
           
 short decodeShort(byte[] a)
           
 byte[] encodeBoolean(boolean b)
           
 byte[] encodeBoolean(boolean b, byte[] ret)
           
 byte[] encodeByte(byte b)
           
 byte[] encodeByte(byte b, byte[] ret)
           
 byte[] encodeDouble(double d)
           
 byte[] encodeDouble(double d, byte[] ret)
           
 byte[] encodeFloat(float d)
           
 byte[] encodeFloat(float d, byte[] ret)
           
 byte[] encodeInt(int i)
           
 byte[] encodeInt(int i, byte[] ret)
           
 byte[] encodeLong(long l)
           
 byte[] encodeLong(long l, byte[] ret)
           
 byte[] encodeShort(short s)
           
 byte[] encodeShort(short s, byte[] ret)
           
 byte[] followingKey(int size, byte[] per)
           
 byte[] lastPossibleKey(int size, byte[] er)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexEncoder

public HexEncoder()
Method Detail

encodeByte

public byte[] encodeByte(byte b,
                         byte[] ret)
Specified by:
encodeByte in interface Encoder

encodeByte

public byte[] encodeByte(byte b)
Specified by:
encodeByte in interface Encoder

decodeByte

public byte decodeByte(byte[] a)
Specified by:
decodeByte in interface Encoder

encodeShort

public byte[] encodeShort(short s)
Specified by:
encodeShort in interface Encoder

encodeShort

public byte[] encodeShort(short s,
                          byte[] ret)
Specified by:
encodeShort in interface Encoder

decodeShort

public short decodeShort(byte[] a)
Specified by:
decodeShort in interface Encoder

encodeInt

public byte[] encodeInt(int i)
Specified by:
encodeInt in interface Encoder

encodeInt

public byte[] encodeInt(int i,
                        byte[] ret)
Specified by:
encodeInt in interface Encoder

decodeInt

public int decodeInt(byte[] a)
Specified by:
decodeInt in interface Encoder

encodeLong

public byte[] encodeLong(long l)
Specified by:
encodeLong in interface Encoder

encodeLong

public byte[] encodeLong(long l,
                         byte[] ret)
Specified by:
encodeLong in interface Encoder

decodeLong

public long decodeLong(byte[] a)
Specified by:
decodeLong in interface Encoder

encodeDouble

public byte[] encodeDouble(double d)
Specified by:
encodeDouble in interface Encoder

encodeDouble

public byte[] encodeDouble(double d,
                           byte[] ret)
Specified by:
encodeDouble in interface Encoder

decodeDouble

public double decodeDouble(byte[] a)
Specified by:
decodeDouble in interface Encoder

encodeFloat

public byte[] encodeFloat(float d)
Specified by:
encodeFloat in interface Encoder

encodeFloat

public byte[] encodeFloat(float d,
                          byte[] ret)
Specified by:
encodeFloat in interface Encoder

decodeFloat

public float decodeFloat(byte[] a)
Specified by:
decodeFloat in interface Encoder

decodeBoolean

public boolean decodeBoolean(byte[] val)
Specified by:
decodeBoolean in interface Encoder

encodeBoolean

public byte[] encodeBoolean(boolean b)
Specified by:
encodeBoolean in interface Encoder

encodeBoolean

public byte[] encodeBoolean(boolean b,
                            byte[] ret)
Specified by:
encodeBoolean in interface Encoder

followingKey

public byte[] followingKey(int size,
                           byte[] per)
Specified by:
followingKey in interface Encoder

lastPossibleKey

public byte[] lastPossibleKey(int size,
                              byte[] er)
Specified by:
lastPossibleKey in interface Encoder


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.