Package org.nustaq.serialization
Interface FSTObjectSerializer
- All Known Subinterfaces:
FSTCrossPlatformSerialzer
- All Known Implementing Classes:
FSTArrayListSerializer,FSTBasicObjectSerializer,FSTBigIntegerSerializer,FSTBigNumberSerializers.FSTByteSerializer,FSTBigNumberSerializers.FSTCharSerializer,FSTBigNumberSerializers.FSTDoubleSerializer,FSTBigNumberSerializers.FSTFloatSerializer,FSTBigNumberSerializers.FSTShortSerializer,FSTBitSetSerializer,FSTClassSerializer,FSTCollectionSerializer,FSTCPEnumSetSerializer,FSTCPThrowableSerializer,FSTDateSerializer,FSTEnumSetSerializer,FSTJSonSerializers.BigDecSerializer,FSTJSonUnmodifiableCollectionSerializer,FSTJSonUnmodifiableMapSerializer,FSTMapSerializer,FSTProxySerializer,FSTStringBufferSerializer,FSTStringBuilderSerializer,FSTStringSerializer,FSTThrowableSerializer,FSTTimestampSerializer
public interface FSTObjectSerializer
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleaninstantiate(Class objectClass, FSTObjectInput fstObjectInput, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) return null to delegate object instantiation to FST.voidreadObject(FSTObjectInput in, Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) read the content to an already instantiated objectbooleanwillHandleClass(Class cl) useful if you register for a class and its subclasses, but want to exclude a specific subclassvoidwriteObject(FSTObjectOutput out, Object toWrite, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy, int streamPosition) write the contents of a given object
-
Field Details
-
REALLY_NULL
- See Also:
-
-
Method Details
-
writeObject
void writeObject(FSTObjectOutput out, Object toWrite, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy, int streamPosition) throws IOException write the contents of a given object- Throws:
IOException
-
readObject
void readObject(FSTObjectInput in, Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) throws Exception read the content to an already instantiated object- Throws:
Exception
-
willHandleClass
useful if you register for a class and its subclasses, but want to exclude a specific subclass -
alwaysCopy
boolean alwaysCopy()- Returns:
- true if FST can skip a search for same instances in the serialized ObjectGraph. This speeds up reading and writing and makes sense for short immutable such as Integer, Short, Character, Date, .. . For those classes it is more expensive (CPU, size) to do a lookup than to just write the Object twice in case.
-
instantiate
Object instantiate(Class objectClass, FSTObjectInput fstObjectInput, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) throws Exception return null to delegate object instantiation to FST. If you want to implement object instantiation yourself, usually you leave the readObject method empty and handle instantiation and reading the object here. You must call registerObjectForWrite immediately after creating it on the FSTObjectInput- Throws:
Exception
-