public class JsonSerializer extends SerializationService
| Constructor and Description |
|---|
JsonSerializer() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
read(java.io.InputStream inputStream,
java.lang.Class<T> classType)
Read a JSON string from the given input stream and returns the Object representation.
|
void |
write(java.io.OutputStream outputStream,
Storable obj)
Stores the given object on the output stream as JSON.
|
toBytespublic void write(java.io.OutputStream outputStream,
Storable obj)
throws java.io.IOException
write in class SerializationServiceoutputStream - 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 SerializationServiceinputStream - 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.