public class FSTObjectInput extends Object implements ObjectInput
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FSTObjectInput.CallbackEntry |
static interface |
FSTObjectInput.ConditionalCallback |
protected static class |
FSTObjectInput.MyObjectStream |
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<FSTObjectInput.CallbackEntry> |
callbacks |
protected FSTClazzInfoRegistry |
clInfoRegistry |
protected boolean |
closed |
protected FSTDecoder |
codec |
protected FSTObjectInput.ConditionalCallback |
conditionalCallback |
protected FSTConfiguration |
conf |
protected int |
curDepth |
protected Stack<String> |
debugStack |
static ByteArrayInputStream |
emptyStream |
protected FSTObjectInput.MyObjectStream |
fakeWrapper |
protected boolean |
ignoreAnnotations |
protected FSTClazzInfo.FSTFieldInfo |
infoCache |
protected boolean |
isCrossPlatform |
protected FSTObjectRegistry |
objects |
protected int |
readExternalReadAHead |
static boolean |
REGISTER_ENUMS_READ |
protected VersionConflictListener |
versionConflictListener |
| Constructor and Description |
|---|
FSTObjectInput() |
FSTObjectInput(FSTConfiguration conf) |
FSTObjectInput(InputStream in)
Creates a FSTObjectInput that uses the specified
underlying InputStream.
|
FSTObjectInput(InputStream in,
FSTConfiguration conf)
Creates a FSTObjectInput that uses the specified
underlying InputStream.
|
public static boolean REGISTER_ENUMS_READ
public static ByteArrayInputStream emptyStream
protected FSTDecoder codec
protected FSTObjectRegistry objects
protected int curDepth
protected ArrayList<FSTObjectInput.CallbackEntry> callbacks
protected boolean ignoreAnnotations
protected FSTClazzInfoRegistry clInfoRegistry
protected FSTObjectInput.ConditionalCallback conditionalCallback
protected int readExternalReadAHead
protected VersionConflictListener versionConflictListener
protected FSTConfiguration conf
protected boolean isCrossPlatform
protected FSTClazzInfo.FSTFieldInfo infoCache
protected boolean closed
protected FSTObjectInput.MyObjectStream fakeWrapper
public FSTObjectInput()
throws IOException
IOExceptionpublic FSTObjectInput(FSTConfiguration conf)
public FSTObjectInput(InputStream in) throws IOException
in - the specified input streamIOExceptionpublic FSTObjectInput(InputStream in, FSTConfiguration conf)
in - the specified input streampublic FSTConfiguration getConf()
public void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic FSTDecoder getCodec()
protected void setCodec(FSTDecoder codec)
public Class getClassForName(String name) throws ClassNotFoundException
ClassNotFoundExceptionprotected void initRegistries(FSTConfiguration conf)
public FSTObjectInput.ConditionalCallback getConditionalCallback()
public void setConditionalCallback(FSTObjectInput.ConditionalCallback conditionalCallback)
public int getReadExternalReadAHead()
public void setReadExternalReadAHead(int readExternalReadAHead)
readExternalReadAHead - public Object readObject() throws ClassNotFoundException, IOException
readObject in interface ObjectInputClassNotFoundExceptionIOExceptionpublic int read()
throws IOException
read in interface ObjectInputIOExceptionpublic int read(byte[] b)
throws IOException
read in interface ObjectInputIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in interface ObjectInputIOExceptionpublic long skip(long n)
throws IOException
skip in interface ObjectInputIOExceptionpublic int available()
throws IOException
available in interface ObjectInputIOExceptionprotected void processValidation()
throws InvalidObjectException
InvalidObjectExceptionpublic Object readObjectInternal(Class... expected) throws ClassNotFoundException, IOException, IllegalAccessException, InstantiationException
public Object readObjectWithHeader(FSTClazzInfo.FSTFieldInfo referencee) throws Exception
Exceptionprotected Object instantiateSpecialTag(FSTClazzInfo.FSTFieldInfo referencee, int readPos, byte code) throws Exception
Exceptionprotected FSTClazzInfo getClazzInfo(Class c, FSTClazzInfo.FSTFieldInfo referencee)
protected Object instantiateHandle(FSTClazzInfo.FSTFieldInfo referencee) throws IOException
IOExceptionprotected Object instantiateArray(FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws Exception
Exceptionprotected Object instantiateEnum(FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionprotected Object instantiateBigInt() throws IOException
IOExceptionprotected Object instantiateAndReadWithSer(Class c, FSTObjectSerializer ser, FSTClazzInfo clzSerInfo, FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws Exception
Exceptionprotected Object instantiateAndReadNoSer(Class c, FSTClazzInfo clzSerInfo, FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws Exception
Exceptionprotected Object readObjectCompatible(FSTClazzInfo.FSTFieldInfo referencee, FSTClazzInfo serializationInfo, Object newObj) throws Exception
Exceptionprotected Object handleReadRessolve(FSTClazzInfo serializationInfo, Object newObj) throws IllegalAccessException
IllegalAccessExceptionprotected void readObjectCompatibleRecursive(FSTClazzInfo.FSTFieldInfo referencee, Object toRead, FSTClazzInfo serializationInfo, Class cl) throws Exception
Exceptionpublic void defaultReadObject(FSTClazzInfo.FSTFieldInfo referencee, FSTClazzInfo serializationInfo, Object newObj)
protected void readObjectFields(FSTClazzInfo.FSTFieldInfo referencee, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo[] fieldInfo, Object newObj, int startIndex, int version) throws Exception
Exceptionpublic VersionConflictListener getVersionConflictListener()
public void setVersionConflictListener(VersionConflictListener versionConflictListener)
versionConflictListener - protected void oldVersionRead(Object newObj)
protected void readFieldsMapBased(FSTClazzInfo.FSTFieldInfo referencee, FSTClazzInfo serializationInfo, Object newObj) throws Exception
Exceptionprotected boolean skipConditional(Object newObj, int conditional, FSTClazzInfo.FSTFieldInfo subInfo)
protected void readCompatibleObjectFields(FSTClazzInfo.FSTFieldInfo referencee, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo[] fieldInfo, Map res) throws Exception
Exceptionpublic String readStringUTF() throws IOException
IOExceptionpublic String readStringAsc() throws IOException
IOExceptionprotected Object readArray(FSTClazzInfo.FSTFieldInfo referencee) throws Exception
Exceptionprotected Object readArrayNoHeader(FSTClazzInfo.FSTFieldInfo referencee, int pos, Class arrCl) throws Exception
Exceptionpublic void registerObject(Object o, int streamPosition, FSTClazzInfo info, FSTClazzInfo.FSTFieldInfo referencee)
public FSTClazzInfo readClass() throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionprotected void resetAndClearRefs()
public void reset()
throws IOException
IOExceptionpublic void resetForReuse(InputStream in) throws IOException
IOExceptionpublic void resetForReuseCopyArray(byte[] bytes,
int off,
int len)
throws IOException
IOExceptionpublic void resetForReuseUseArray(byte[] bytes)
throws IOException
IOExceptionpublic void resetForReuseUseArray(byte[] bytes,
int len)
throws IOException
IOExceptionpublic final int readFInt()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface ObjectInputclose in interface AutoCloseableIOExceptionprotected ObjectInputStream getObjectInputStream(Class cl, FSTClazzInfo clInfo, FSTClazzInfo.FSTFieldInfo referencee, Object toRead) throws IOException
IOExceptionprotected void pushBack(int i)
Copyright © 2017. All rights reserved.