|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.raw.DataDecoder
public class DataDecoder
A very low-level class that decodes key components encoded by methods of
DataEncoder.
KeyDecoder| Constructor Summary | |
|---|---|
DataDecoder()
|
|
| Method Summary | |
|---|---|
static int |
decode(byte[] src,
int srcOffset,
BigDecimal[] valueRef)
Decodes a BigDecimal. |
static int |
decode(byte[] src,
int srcOffset,
BigInteger[] valueRef)
Decodes a BigInteger. |
static int |
decode(byte[] src,
int srcOffset,
byte[][] valueRef)
Decodes the given byte array. |
static boolean |
decodeBoolean(byte[] src,
int srcOffset)
Decodes a boolean from exactly 1 byte. |
static Boolean |
decodeBooleanObj(byte[] src,
int srcOffset)
Decodes a Boolean object from exactly 1 byte. |
static byte |
decodeByte(byte[] src,
int srcOffset)
Decodes a signed byte from exactly 1 byte. |
static Byte |
decodeByteObj(byte[] src,
int srcOffset)
Decodes a signed Byte object from exactly 1 or 2 bytes. |
static char |
decodeChar(byte[] src,
int srcOffset)
Decodes a char from exactly 2 bytes. |
static Character |
decodeCharacterObj(byte[] src,
int srcOffset)
Decodes a Character object from exactly 1 or 3 bytes. |
static double |
decodeDouble(byte[] src,
int srcOffset)
Decodes a double from exactly 8 bytes. |
protected static long |
decodeDoubleBits(byte[] src,
int srcOffset)
|
static Double |
decodeDoubleObj(byte[] src,
int srcOffset)
Decodes a Double object from exactly 8 bytes. |
static float |
decodeFloat(byte[] src,
int srcOffset)
Decodes a float from exactly 4 bytes. |
protected static int |
decodeFloatBits(byte[] src,
int srcOffset)
|
static Float |
decodeFloatObj(byte[] src,
int srcOffset)
Decodes a Float object from exactly 4 bytes. |
static int |
decodeInt(byte[] src,
int srcOffset)
Decodes a signed integer from exactly 4 bytes. |
static Integer |
decodeIntegerObj(byte[] src,
int srcOffset)
Decodes a signed Integer object from exactly 1 or 5 bytes. |
static long |
decodeLong(byte[] src,
int srcOffset)
Decodes a signed long from exactly 8 bytes. |
static Long |
decodeLongObj(byte[] src,
int srcOffset)
Decodes a signed Long object from exactly 1 or 9 bytes. |
static short |
decodeShort(byte[] src,
int srcOffset)
Decodes a signed short from exactly 2 bytes. |
static Short |
decodeShortObj(byte[] src,
int srcOffset)
Decodes a signed Short object from exactly 1 or 3 bytes. |
static byte[] |
decodeSingle(byte[] src,
int prefixPadding,
int suffixPadding)
Decodes the given byte array which was encoded by DataEncoder.encodeSingle(byte[], int, int). |
static byte[] |
decodeSingleNullable(byte[] src)
Decodes the given byte array which was encoded by DataEncoder.encodeSingleNullable(byte[]). |
static byte[] |
decodeSingleNullable(byte[] src,
int prefixPadding,
int suffixPadding)
Decodes the given byte array which was encoded by DataEncoder.encodeSingleNullable(byte[]). |
static int |
decodeString(byte[] src,
int srcOffset,
String[] valueRef)
Decodes an encoded string from the given byte array. |
static void |
readFully(InputStream in,
byte[] b)
Reads as many bytes from the stream as is necessary to fill the given byte array. |
static int |
readLength(InputStream in)
Decodes a length value which was encoded by DataEncoder.writeLength(int, java.io.OutputStream). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataDecoder()
| Method Detail |
|---|
public static int decodeInt(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Integer decodeIntegerObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static long decodeLong(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Long decodeLongObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static byte decodeByte(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Byte decodeByteObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static short decodeShort(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Short decodeShortObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static char decodeChar(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Character decodeCharacterObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static boolean decodeBoolean(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Boolean decodeBooleanObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static float decodeFloat(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Float decodeFloatObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
protected static int decodeFloatBits(byte[] src,
int srcOffset)
throws CorruptEncodingException
CorruptEncodingException
public static double decodeDouble(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
public static Double decodeDoubleObj(byte[] src,
int srcOffset)
throws CorruptEncodingException
src - source of encoded bytessrcOffset - offset into source array
CorruptEncodingException
protected static long decodeDoubleBits(byte[] src,
int srcOffset)
throws CorruptEncodingException
CorruptEncodingException
public static int decode(byte[] src,
int srcOffset,
BigInteger[] valueRef)
throws CorruptEncodingException
src - source of encoded datasrcOffset - offset into encoded datavalueRef - decoded BigInteger is stored in element 0, which may be null
CorruptEncodingException - if source data is corrupt
public static int decode(byte[] src,
int srcOffset,
BigDecimal[] valueRef)
throws CorruptEncodingException
src - source of encoded datasrcOffset - offset into encoded datavalueRef - decoded BigDecimal is stored in element 0, which may be null
CorruptEncodingException - if source data is corrupt
public static int decode(byte[] src,
int srcOffset,
byte[][] valueRef)
throws CorruptEncodingException
src - source of encoded datasrcOffset - offset into encoded datavalueRef - decoded byte array is stored in element 0, which may be null
CorruptEncodingException - if source data is corrupt
public static int decodeString(byte[] src,
int srcOffset,
String[] valueRef)
throws CorruptEncodingException
src - source of encoded datasrcOffset - offset into encoded datavalueRef - decoded string is stored in element 0, which may be null
CorruptEncodingException - if source data is corrupt
public static int readLength(InputStream in)
throws IOException,
EOFException
DataEncoder.writeLength(int, java.io.OutputStream).
IOException
EOFException
public static void readFully(InputStream in,
byte[] b)
throws IOException,
EOFException
IOException
EOFException
public static byte[] decodeSingle(byte[] src,
int prefixPadding,
int suffixPadding)
throws CorruptEncodingException
DataEncoder.encodeSingle(byte[], int, int). Always returns a new byte array instance.
prefixPadding - amount of extra bytes to skip from start of encoded byte arraysuffixPadding - amount of extra bytes to skip at end of encoded byte array
CorruptEncodingException
public static byte[] decodeSingleNullable(byte[] src)
throws CorruptEncodingException
DataEncoder.encodeSingleNullable(byte[]). Always returns a new byte array
instance.
CorruptEncodingException
public static byte[] decodeSingleNullable(byte[] src,
int prefixPadding,
int suffixPadding)
throws CorruptEncodingException
DataEncoder.encodeSingleNullable(byte[]). Always returns a new byte array
instance.
prefixPadding - amount of extra bytes to skip from start of encoded byte arraysuffixPadding - amount of extra bytes to skip at end of encoded byte array
CorruptEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||