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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintclassForName(String name) voidclose()coerceElement(Class arrType, Object value) voidvoidendFieldReading(Object newObj) only called when reading named fieldsintensureReadAhead(int bytes) byte[]intintbooleaninArray()return wether current stream is reading an object or sequence currently makes sense for MinBin and JSon only, only Json serializer actually has implemented itbooleanbooleanvoidmoveTo(int position) voidpushBack(int bytes) voidreadArrayEnd(FSTClazzInfo clzSerInfo) voidbytechardoublefloatintreadFInt()voidreadFIntArr(int len, int[] arr) longreadFPrimitiveArray(Object array, Class componentType, int len) shortintvoidbytevoidreadPlainBytes(byte[] b, int off, int len) intintvoidregisterClass(Class possible) voidreset()voidresetToCopyOf(byte[] bytes, int off, int len) voidresetWith(byte[] bytes, int len) voidsetConf(FSTConfiguration conf) voidvoidskip(int n) voidstartFieldReading(Object newObj) quirks for json unknown decoding.
-
Constructor Details
-
FSTMinBinDecoder
-
-
Method Details
-
setConf
- Specified by:
setConfin interfaceFSTDecoder
-
readStringUTF
- Specified by:
readStringUTFin interfaceFSTDecoder- Throws:
IOException
-
readStringAsc
- Specified by:
readStringAscin interfaceFSTDecoder- Throws:
IOException
-
readFPrimitiveArray
- Specified by:
readFPrimitiveArrayin interfaceFSTDecoder
-
readFIntArr
- Specified by:
readFIntArrin interfaceFSTDecoder- Throws:
IOException
-
readFInt
- Specified by:
readFIntin interfaceFSTDecoder- Throws:
IOException
-
readFDouble
- Specified by:
readFDoublein interfaceFSTDecoder- Throws:
IOException
-
readFFloat
- Specified by:
readFFloatin interfaceFSTDecoder- Throws:
IOException
-
readFByte
- Specified by:
readFBytein interfaceFSTDecoder- Throws:
IOException
-
readIntByte
- Specified by:
readIntBytein interfaceFSTDecoder- Throws:
IOException
-
readFLong
- Specified by:
readFLongin interfaceFSTDecoder- Throws:
IOException
-
readFChar
- Specified by:
readFCharin interfaceFSTDecoder- Throws:
IOException
-
readFShort
- Specified by:
readFShortin interfaceFSTDecoder- Throws:
IOException
-
readPlainInt
- Specified by:
readPlainIntin interfaceFSTDecoder- Throws:
IOException
-
getBuffer
public byte[] getBuffer()- Specified by:
getBufferin interfaceFSTDecoder
-
getInputPos
public int getInputPos()- Specified by:
getInputPosin interfaceFSTDecoder
-
moveTo
public void moveTo(int position) - Specified by:
moveToin interfaceFSTDecoder
-
setInputStream
- Specified by:
setInputStreamin interfaceFSTDecoder
-
ensureReadAhead
public int ensureReadAhead(int bytes) - Specified by:
ensureReadAheadin interfaceFSTDecoder
-
reset
public void reset()- Specified by:
resetin interfaceFSTDecoder
-
resetToCopyOf
public void resetToCopyOf(byte[] bytes, int off, int len) - Specified by:
resetToCopyOfin interfaceFSTDecoder
-
resetWith
public void resetWith(byte[] bytes, int len) - Specified by:
resetWithin interfaceFSTDecoder
-
getObjectHeaderLen
public int getObjectHeaderLen()- Specified by:
getObjectHeaderLenin interfaceFSTDecoder
-
readObjectHeaderTag
- Specified by:
readObjectHeaderTagin interfaceFSTDecoder- Throws:
IOException
-
getDirectObject
- Specified by:
getDirectObjectin interfaceFSTDecoder
-
readClass
- Specified by:
readClassin interfaceFSTDecoder- Throws:
IOExceptionClassNotFoundException
-
classForName
- Specified by:
classForNamein interfaceFSTDecoder- Throws:
ClassNotFoundException
-
registerClass
- Specified by:
registerClassin interfaceFSTDecoder
-
close
public void close()- Specified by:
closein interfaceFSTDecoder
-
skip
public void skip(int n) - Specified by:
skipin interfaceFSTDecoder
-
readPlainBytes
public void readPlainBytes(byte[] b, int off, int len) - Specified by:
readPlainBytesin interfaceFSTDecoder
-
isMapBased
public boolean isMapBased()- Specified by:
isMapBasedin interfaceFSTDecoder
-
consumeEndMarker
public void consumeEndMarker()- Specified by:
consumeEndMarkerin interfaceFSTDecoder
-
readArrayHeader
- Specified by:
readArrayHeaderin interfaceFSTDecoder- Throws:
Exception
-
readExternalEnd
public void readExternalEnd()- Specified by:
readExternalEndin interfaceFSTDecoder
-
isEndMarker
- Specified by:
isEndMarkerin interfaceFSTDecoder
-
readVersionTag
- Specified by:
readVersionTagin interfaceFSTDecoder- Throws:
IOException
-
pushBack
public void pushBack(int bytes) - Specified by:
pushBackin interfaceFSTDecoder
-
readArrayEnd
- Specified by:
readArrayEndin interfaceFSTDecoder
-
readObjectEnd
public void readObjectEnd()- Specified by:
readObjectEndin interfaceFSTDecoder
-
coerceElement
- Specified by:
coerceElementin interfaceFSTDecoder
-
available
public int available()- Specified by:
availablein interfaceFSTDecoder- Returns:
- a value > 0 if more bytes are available
-
inArray
public boolean inArray()Description copied from interface:FSTDecoderreturn 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:
inArrayin interfaceFSTDecoder- Returns:
-
startFieldReading
Description copied from interface:FSTDecoderquirks for json unknown decoding. Need a hook to set original classname only called when reading named fields- Specified by:
startFieldReadingin interfaceFSTDecoder
-
endFieldReading
Description copied from interface:FSTDecoderonly called when reading named fields- Specified by:
endFieldReadingin interfaceFSTDecoder
-