Package org.nustaq.serialization.coders
Class FSTMinBinDecoder
java.lang.Object
org.nustaq.serialization.coders.FSTMinBinDecoder
- All Implemented Interfaces:
FSTDecoder
Date: 02.04.2014
Time: 19:13
Deserializes from self describing binary MinBin format
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
classForName
(String name) void
close()
coerceElement
(Class arrType, Object value) void
void
endFieldReading
(Object newObj) only called when reading named fieldsint
ensureReadAhead
(int bytes) byte[]
int
int
boolean
inArray()
return wether current stream is reading an object or sequence currently makes sense for MinBin and JSon only, only Json serializer actually has implemented itboolean
boolean
void
moveTo
(int position) void
pushBack
(int bytes) void
readArrayEnd
(FSTClazzInfo clzSerInfo) void
byte
char
double
float
int
readFInt()
void
readFIntArr
(int len, int[] arr) long
readFPrimitiveArray
(Object array, Class componentType, int len) short
int
void
byte
void
readPlainBytes
(byte[] b, int off, int len) int
int
void
registerClass
(Class possible) void
reset()
void
resetToCopyOf
(byte[] bytes, int off, int len) void
resetWith
(byte[] bytes, int len) void
setConf
(FSTConfiguration conf) void
void
skip
(int n) void
startFieldReading
(Object newObj) quirks for json unknown decoding.
-
Constructor Details
-
FSTMinBinDecoder
-
-
Method Details
-
setConf
- Specified by:
setConf
in interfaceFSTDecoder
-
readStringUTF
- Specified by:
readStringUTF
in interfaceFSTDecoder
- Throws:
IOException
-
readStringAsc
- Specified by:
readStringAsc
in interfaceFSTDecoder
- Throws:
IOException
-
readFPrimitiveArray
- Specified by:
readFPrimitiveArray
in interfaceFSTDecoder
-
readFIntArr
- Specified by:
readFIntArr
in interfaceFSTDecoder
- Throws:
IOException
-
readFInt
- Specified by:
readFInt
in interfaceFSTDecoder
- Throws:
IOException
-
readFDouble
- Specified by:
readFDouble
in interfaceFSTDecoder
- Throws:
IOException
-
readFFloat
- Specified by:
readFFloat
in interfaceFSTDecoder
- Throws:
IOException
-
readFByte
- Specified by:
readFByte
in interfaceFSTDecoder
- Throws:
IOException
-
readIntByte
- Specified by:
readIntByte
in interfaceFSTDecoder
- Throws:
IOException
-
readFLong
- Specified by:
readFLong
in interfaceFSTDecoder
- Throws:
IOException
-
readFChar
- Specified by:
readFChar
in interfaceFSTDecoder
- Throws:
IOException
-
readFShort
- Specified by:
readFShort
in interfaceFSTDecoder
- Throws:
IOException
-
readPlainInt
- Specified by:
readPlainInt
in interfaceFSTDecoder
- Throws:
IOException
-
getBuffer
public byte[] getBuffer()- Specified by:
getBuffer
in interfaceFSTDecoder
-
getInputPos
public int getInputPos()- Specified by:
getInputPos
in interfaceFSTDecoder
-
moveTo
public void moveTo(int position) - Specified by:
moveTo
in interfaceFSTDecoder
-
setInputStream
- Specified by:
setInputStream
in interfaceFSTDecoder
-
ensureReadAhead
public int ensureReadAhead(int bytes) - Specified by:
ensureReadAhead
in interfaceFSTDecoder
-
reset
public void reset()- Specified by:
reset
in interfaceFSTDecoder
-
resetToCopyOf
public void resetToCopyOf(byte[] bytes, int off, int len) - Specified by:
resetToCopyOf
in interfaceFSTDecoder
-
resetWith
public void resetWith(byte[] bytes, int len) - Specified by:
resetWith
in interfaceFSTDecoder
-
getObjectHeaderLen
public int getObjectHeaderLen()- Specified by:
getObjectHeaderLen
in interfaceFSTDecoder
-
readObjectHeaderTag
- Specified by:
readObjectHeaderTag
in interfaceFSTDecoder
- Throws:
IOException
-
getDirectObject
- Specified by:
getDirectObject
in interfaceFSTDecoder
-
readClass
- Specified by:
readClass
in interfaceFSTDecoder
- Throws:
IOException
ClassNotFoundException
-
classForName
- Specified by:
classForName
in interfaceFSTDecoder
- Throws:
ClassNotFoundException
-
registerClass
- Specified by:
registerClass
in interfaceFSTDecoder
-
close
public void close()- Specified by:
close
in interfaceFSTDecoder
-
skip
public void skip(int n) - Specified by:
skip
in interfaceFSTDecoder
-
readPlainBytes
public void readPlainBytes(byte[] b, int off, int len) - Specified by:
readPlainBytes
in interfaceFSTDecoder
-
isMapBased
public boolean isMapBased()- Specified by:
isMapBased
in interfaceFSTDecoder
-
consumeEndMarker
public void consumeEndMarker()- Specified by:
consumeEndMarker
in interfaceFSTDecoder
-
readArrayHeader
- Specified by:
readArrayHeader
in interfaceFSTDecoder
- Throws:
Exception
-
readExternalEnd
public void readExternalEnd()- Specified by:
readExternalEnd
in interfaceFSTDecoder
-
isEndMarker
- Specified by:
isEndMarker
in interfaceFSTDecoder
-
readVersionTag
- Specified by:
readVersionTag
in interfaceFSTDecoder
- Throws:
IOException
-
pushBack
public void pushBack(int bytes) - Specified by:
pushBack
in interfaceFSTDecoder
-
readArrayEnd
- Specified by:
readArrayEnd
in interfaceFSTDecoder
-
readObjectEnd
public void readObjectEnd()- Specified by:
readObjectEnd
in interfaceFSTDecoder
-
coerceElement
- Specified by:
coerceElement
in interfaceFSTDecoder
-
available
public int available()- Specified by:
available
in interfaceFSTDecoder
- Returns:
- a value > 0 if more bytes are available
-
inArray
public boolean inArray()Description copied from interface:FSTDecoder
return wether current stream is reading an object or sequence currently makes sense for MinBin and JSon only, only Json serializer actually has implemented it- Specified by:
inArray
in interfaceFSTDecoder
- Returns:
-
startFieldReading
Description copied from interface:FSTDecoder
quirks for json unknown decoding. Need a hook to set original classname only called when reading named fields- Specified by:
startFieldReading
in interfaceFSTDecoder
-
endFieldReading
Description copied from interface:FSTDecoder
only called when reading named fields- Specified by:
endFieldReading
in interfaceFSTDecoder
-