public class BinaryEncoder extends Object implements Encoder
Constructor and Description |
---|
BinaryEncoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
decodeBoolean(byte[] a) |
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 f,
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) |
public byte[] encodeShort(short s) throws IOException
encodeShort
in interface Encoder
IOException
public byte[] encodeShort(short s, byte[] ret) throws IOException
encodeShort
in interface Encoder
IOException
public short decodeShort(byte[] a) throws IOException
decodeShort
in interface Encoder
IOException
public byte[] encodeInt(int i) throws IOException
encodeInt
in interface Encoder
IOException
public byte[] encodeInt(int i, byte[] ret) throws IOException
encodeInt
in interface Encoder
IOException
public int decodeInt(byte[] a) throws IOException
decodeInt
in interface Encoder
IOException
public byte[] encodeLong(long l) throws IOException
encodeLong
in interface Encoder
IOException
public byte[] encodeLong(long l, byte[] ret) throws IOException
encodeLong
in interface Encoder
IOException
public long decodeLong(byte[] a) throws IOException
decodeLong
in interface Encoder
IOException
public byte[] encodeDouble(double d) throws IOException
encodeDouble
in interface Encoder
IOException
public byte[] encodeDouble(double d, byte[] ret) throws IOException
encodeDouble
in interface Encoder
IOException
public double decodeDouble(byte[] a) throws IOException
decodeDouble
in interface Encoder
IOException
public byte[] encodeFloat(float d) throws IOException
encodeFloat
in interface Encoder
IOException
public byte[] encodeFloat(float f, byte[] ret) throws IOException
encodeFloat
in interface Encoder
IOException
public float decodeFloat(byte[] a) throws IOException
decodeFloat
in interface Encoder
IOException
public byte[] encodeByte(byte b, byte[] ret)
encodeByte
in interface Encoder
public byte[] encodeByte(byte b)
encodeByte
in interface Encoder
public byte decodeByte(byte[] a)
decodeByte
in interface Encoder
public boolean decodeBoolean(byte[] a) throws IOException
decodeBoolean
in interface Encoder
IOException
public byte[] encodeBoolean(boolean b) throws IOException
encodeBoolean
in interface Encoder
IOException
public byte[] encodeBoolean(boolean b, byte[] ret) throws IOException
encodeBoolean
in interface Encoder
IOException
public byte[] lastPossibleKey(int size, byte[] er)
lastPossibleKey
in interface Encoder
public byte[] followingKey(int size, byte[] per)
followingKey
in interface Encoder
Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.