Package org.nustaq.serialization
Interface FSTDecoder
- All Known Implementing Classes:
FSTBytezDecoder,FSTJsonDecoder,FSTMinBinDecoder,FSTStreamDecoder
public interface FSTDecoder
Created by ruedi on 27.03.14.
-
Method Summary
Modifier and Type Method Description intavailable()ClassclassForName(String name)voidclose()ObjectcoerceElement(Class arrType, Object value)voidconsumeEndMarker()voidendFieldReading(Object newObj)only called when reading named fieldsintensureReadAhead(int bytes)byte[]getBuffer()ObjectgetDirectObject()intgetInputPos()intgetObjectHeaderLen()booleaninArray()return wether current stream is reading an object or sequence currently makes sense for MinBin and JSon only, only Json serializer actually has implemented itbooleanisEndMarker(String s)booleanisMapBased()voidmoveTo(int position)voidpushBack(int bytes)voidreadArrayEnd(FSTClazzInfo clzSerInfo)ObjectreadArrayHeader()FSTClazzInforeadClass()voidreadExternalEnd()bytereadFByte()charreadFChar()doublereadFDouble()floatreadFFloat()intreadFInt()voidreadFIntArr(int len, int[] arr)longreadFLong()ObjectreadFPrimitiveArray(Object array, Class componentType, int len)shortreadFShort()intreadIntByte()voidreadObjectEnd()bytereadObjectHeaderTag()voidreadPlainBytes(byte[] b, int off, int len)intreadPlainInt()StringreadStringAsc()StringreadStringUTF()intreadVersionTag()voidregisterClass(Class possible)voidreset()voidresetToCopyOf(byte[] bytes, int off, int len)voidresetWith(byte[] bytes, int len)voidsetConf(FSTConfiguration conf)voidsetInputStream(InputStream in)voidskip(int n)voidstartFieldReading(Object newObj)quirks for json unknown decoding.
-
Method Details
-
setConf
-
readStringUTF
- Throws:
IOException
-
readStringAsc
- Throws:
IOException
-
readFPrimitiveArray
-
readFIntArr
- Throws:
IOException
-
readFInt
- Throws:
IOException
-
readFDouble
- Throws:
IOException
-
readFFloat
- Throws:
IOException
-
readFByte
- Throws:
IOException
-
readIntByte
- Throws:
IOException
-
readFLong
- Throws:
IOException
-
readFChar
- Throws:
IOException
-
readFShort
- Throws:
IOException
-
readPlainInt
- Throws:
IOException
-
getBuffer
byte[] getBuffer() -
getInputPos
int getInputPos() -
moveTo
void moveTo(int position) -
setInputStream
-
ensureReadAhead
int ensureReadAhead(int bytes) -
reset
void reset() -
resetToCopyOf
void resetToCopyOf(byte[] bytes, int off, int len) -
resetWith
void resetWith(byte[] bytes, int len) -
readClass
- Throws:
IOExceptionClassNotFoundException
-
classForName
- Throws:
ClassNotFoundException
-
registerClass
-
close
void close() -
skip
void skip(int n) -
readPlainBytes
void readPlainBytes(byte[] b, int off, int len) -
readObjectHeaderTag
- Throws:
IOException
-
getObjectHeaderLen
int getObjectHeaderLen() -
isMapBased
boolean isMapBased() -
getDirectObject
Object getDirectObject() -
consumeEndMarker
void consumeEndMarker() -
readArrayHeader
-
readExternalEnd
void readExternalEnd() -
isEndMarker
-
readVersionTag
- Throws:
IOException
-
pushBack
void pushBack(int bytes) -
readArrayEnd
-
readObjectEnd
void readObjectEnd() -
coerceElement
-
available
int available()- Returns:
- a value > 0 if more bytes are available
-
inArray
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 it- Returns:
-
startFieldReading
quirks for json unknown decoding. Need a hook to set original classname only called when reading named fields- Parameters:
newObj-
-
endFieldReading
only called when reading named fields- Parameters:
newObj-
-