Package org.nustaq.serialization
Class FSTObjectInputNoShared
java.lang.Object
org.nustaq.serialization.FSTObjectInput
org.nustaq.serialization.FSTObjectInputNoShared
- All Implemented Interfaces:
java.io.DataInput,java.io.ObjectInput,java.lang.AutoCloseable
public class FSTObjectInputNoShared extends FSTObjectInput
Subclass optimized for "unshared mode". Cycles and Objects referenced more than once will not be detected.
Additionally JDK compatibility is not supported (read/writeObject and stuff). Use case is highperformance
serialization of plain cycle free data (e.g. messaging). Can perform significantly faster (20-40%).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nustaq.serialization.FSTObjectInput
FSTObjectInput.CallbackEntry, FSTObjectInput.ConditionalCallback, FSTObjectInput.MyObjectStream -
Field Summary
Fields inherited from class org.nustaq.serialization.FSTObjectInput
callbacks, clInfoRegistry, closed, codec, conditionalCallback, conf, curDepth, debugStack, emptyStream, fakeWrapper, ignoreAnnotations, infoCache, isCrossPlatform, objects, readExternalReadAHead, REGISTER_ENUMS_READ, versionConflictListener -
Constructor Summary
Constructors Constructor Description FSTObjectInputNoShared()FSTObjectInputNoShared(java.io.InputStream in)Creates a FSTObjectInput that uses the specified underlying InputStream.FSTObjectInputNoShared(java.io.InputStream in, FSTConfiguration conf)Creates a FSTObjectInput that uses the specified underlying InputStream.FSTObjectInputNoShared(FSTConfiguration conf) -
Method Summary
Modifier and Type Method Description protected java.lang.ObjectinstantiateAndReadNoSer(java.lang.Class c, FSTClazzInfo clzSerInfo, FSTClazzInfo.FSTFieldInfo referencee, int readPos)voidregisterObject(java.lang.Object o, int streamPosition, FSTClazzInfo info, FSTClazzInfo.FSTFieldInfo referencee)voidresetForReuse(java.io.InputStream in)voidresetForReuseCopyArray(byte[] bytes, int off, int len)Methods inherited from class org.nustaq.serialization.FSTObjectInput
available, close, defaultReadObject, getClassForName, getClazzInfo, getCodec, getConditionalCallback, getConf, getObjectInputStream, getReadExternalReadAHead, getVersionConflictListener, handleReadRessolve, initRegistries, instantiateAndReadWithSer, instantiateArray, instantiateBigInt, instantiateEnum, instantiateHandle, instantiateSpecialTag, isClosed, oldVersionRead, processValidation, pushBack, read, read, read, readArray, readArrayNoHeader, readBoolean, readByte, readChar, readClass, readCompatibleObjectFields, readDouble, readFieldsMapBased, readFInt, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readObject, readObjectCompatible, readObjectCompatibleRecursive, readObjectFields, readObjectInternal, readObjectWithHeader, readShort, readStringAsc, readStringUTF, readUnsignedByte, readUnsignedShort, readUTF, reset, resetAndClearRefs, resetForReuseUseArray, resetForReuseUseArray, setCodec, setConditionalCallback, setReadExternalReadAHead, setVersionConflictListener, skip, skipBytes, skipConditional
-
Constructor Details
-
FSTObjectInputNoShared
public FSTObjectInputNoShared() throws java.io.IOException- Throws:
java.io.IOException
-
FSTObjectInputNoShared
-
FSTObjectInputNoShared
public FSTObjectInputNoShared(java.io.InputStream in) throws java.io.IOExceptionCreates a FSTObjectInput that uses the specified underlying InputStream.- Parameters:
in- the specified input stream- Throws:
java.io.IOException
-
FSTObjectInputNoShared
Creates a FSTObjectInput that uses the specified underlying InputStream. Don't create a FSTConfiguration with each stream, just create one global static configuration and reuseit. FSTConfiguration is threadsafe.- Parameters:
in- the specified input streamconf-
-
-
Method Details
-
registerObject
public void registerObject(java.lang.Object o, int streamPosition, FSTClazzInfo info, FSTClazzInfo.FSTFieldInfo referencee)- Overrides:
registerObjectin classFSTObjectInput
-
resetForReuse
public void resetForReuse(java.io.InputStream in) throws java.io.IOException- Overrides:
resetForReusein classFSTObjectInput- Throws:
java.io.IOException
-
resetForReuseCopyArray
public void resetForReuseCopyArray(byte[] bytes, int off, int len) throws java.io.IOException- Overrides:
resetForReuseCopyArrayin classFSTObjectInput- Throws:
java.io.IOException
-
instantiateAndReadNoSer
protected java.lang.Object instantiateAndReadNoSer(java.lang.Class c, FSTClazzInfo clzSerInfo, FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws java.lang.Exception- Overrides:
instantiateAndReadNoSerin classFSTObjectInput- Throws:
java.lang.Exception
-