Class Deserializer
java.lang.Object
com.pnfsoftware.jeb.util.serialization.Deserializer
This class allows the deserialization of a stream of bytes into object(s).
The deserialize()
method is interruptible.
-
Constructor Summary
ConstructorDescriptionDeserializer
(ITypeIdProvider customTypeIdProvider, InputStream stream) Deserializer
(ITypeIdProvider customTypeIdProvider, List<ClassLoader> classloaders, InputStream stream) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjectCreatedHook
(Class<?> c, IDeserializationEventHandler handler) void
addProgressCallback
(IProgressCallback callback) <T> T
deserialize
(Class<T> wantedType) int
getFlags()
int
int
void
boolean
boolean
void
removeObjectCreatedHook
(Class<?> c, IDeserializationEventHandler handler) void
removeProgressCallback
(IProgressCallback callback) void
setExpectedObjectCount
(int count) void
setStringPool
(List<String> stringpool)
-
Constructor Details
-
Deserializer
-
Deserializer
public Deserializer(ITypeIdProvider customTypeIdProvider, List<ClassLoader> classloaders, InputStream stream)
-
-
Method Details
-
isInitialized
public boolean isInitialized() -
initialize
- Throws:
IOException
-
getObjectCount
public int getObjectCount() -
getObjects
-
setExpectedObjectCount
public void setExpectedObjectCount(int count) -
addProgressCallback
-
removeProgressCallback
-
deserialize
- Throws:
IOException
-
deserialize
- Throws:
IOException
-
getVersion
public int getVersion() -
getFlags
public int getFlags() -
needsStringPool
public boolean needsStringPool() -
setStringPool
-
addObjectCreatedHook
-
removeObjectCreatedHook
-