SerializedType
- The type of object that can be serialized.public interface TextSerializationHandler<SerializedType> extends StreamSerializationHandler<SerializedType>
AbstractTextSerializationHandler
,
XStreamSerializationHandler
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convertFromString(java.lang.String string)
Converts an object from its serialized string representation.
|
java.lang.String |
convertToString(SerializedType object)
Converts a given object to its serialized string representation.
|
java.lang.Object |
readObject(java.io.Reader reader)
Reads an object from the given reader.
|
void |
writeObject(java.io.Writer writer,
SerializedType object)
Writes an object to the given writer.
|
convertFromBytes, convertToBytes, readObject, writeObject
readFromFile, readFromFile, writeToFile, writeToFile
void writeObject(java.io.Writer writer, SerializedType object) throws java.io.IOException
writer
- Writer to write the object to.object
- The object to write.java.io.IOException
- If there is an i/o error.java.lang.Object readObject(java.io.Reader reader) throws java.io.IOException, java.lang.ClassNotFoundException
reader
- The reader to read an object from.java.io.IOException
- If there is an i/o error.java.lang.ClassNotFoundException
- If a class cannot be found.java.lang.String convertToString(SerializedType object) throws java.io.IOException
object
- The object to serialized to a string.java.io.IOException
- If there is an i/o error.java.lang.Object convertFromString(java.lang.String string) throws java.io.IOException, java.lang.ClassNotFoundException
string
- The string to convert an object from.java.io.IOException
- If there is an i/o error.java.lang.ClassNotFoundException
- If a class cannot be found.