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 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.
-
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-
-