public class JavaSerializer extends SerializationService
Constructor and Description |
---|
JavaSerializer() |
Modifier and Type | Method and Description |
---|---|
<T> T |
read(java.io.InputStream inputStream,
java.lang.Class<T> classType)
Read an object from the given stream of the given type.
|
void |
write(java.io.OutputStream outputStream,
Storable obj)
Stores the given object on the given stream using Java serialization.
|
toBytes
public void write(java.io.OutputStream outputStream, Storable obj) throws java.io.IOException
write
in class SerializationService
outputStream
- The stream on which to store the object.obj
- The object to be stored.java.io.IOException
- If a problem occurs storing the object on the given stream.public <T> T read(java.io.InputStream inputStream, java.lang.Class<T> classType) throws java.io.IOException
read
in class SerializationService
inputStream
- The stream from which to read the object.classType
- The type of object being retrieved.java.io.IOException
- If a problem occurs reading the object from the stream.