T
- Deserialized typepublic final class DelegatingDeserializer<T extends Serializable> extends Object implements Deserializer<T>
ObjectInputStream.readUnshared()
.Modifier and Type | Method and Description |
---|---|
T |
deserialize(ObjectInputStream ois,
SubProgressObserver po)
Deserialize.
|
Class<T> |
getDeserializedType()
Type to be deserialized.
|
static <T extends Serializable> |
write(T o,
long wu,
ObjectOutputStream oos)
Serialize with
Deserializer API contracts. |
public Class<T> getDeserializedType()
Deserializer
getDeserializedType
in interface Deserializer<T extends Serializable>
public T deserialize(ObjectInputStream ois, SubProgressObserver po) throws IOException, ClassNotFoundException
Deserializer
deserialize
in interface Deserializer<T extends Serializable>
ois
- Stream to read from. Will not be closed upon finishing.po
- Progess observer to track progress. Possibly will be swithced to determinate using
ProgressObserver.switchToDeterminate(long)
. Method ProgressObserver.done()
will be called
upon finishing.IOException
- when deserialization failedClassNotFoundException
public static <T extends Serializable> void write(T o, long wu, ObjectOutputStream oos) throws IOException
Deserializer
API contracts.T
- Type of object to serializeo
- Object to serializewu
- Number of completed working units to report by the Deserializer
oos
- Stream to write to; will not be closed by this methodIOException
- Propagated from serialization