SerializedType - The type of object that can be serialized.public abstract class AbstractTextSerializationHandler<SerializedType> extends AbstractStreamSerializationHandler<SerializedType> implements TextSerializationHandler<SerializedType>
TextSerializationHandler interface.
Converts stream calls to readers/writers so all you need to implement are
those versions of the methods.| Constructor and Description |
|---|
AbstractTextSerializationHandler()
Creates a new
AbstractTextSerializationHandler. |
| 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.InputStream stream)
Reads an object from the given stream.
|
void |
writeObject(java.io.OutputStream stream,
SerializedType object)
Writes an object to a given output stream.
|
convertFromBytes, convertToBytes, readFromFile, writeToFilereadFromFile, writeToFilecloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadObject, writeObjectconvertFromBytes, convertToBytesreadFromFile, readFromFile, writeToFile, writeToFilepublic AbstractTextSerializationHandler()
AbstractTextSerializationHandler.public void writeObject(java.io.OutputStream stream,
SerializedType object)
throws java.io.IOException
StreamSerializationHandlerwriteObject in interface StreamSerializationHandler<SerializedType>stream - The stream to write the object to.object - The object to write.java.io.IOException - If there is an i/o error.public java.lang.Object readObject(java.io.InputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
StreamSerializationHandlerreadObject in interface StreamSerializationHandler<SerializedType>stream - The stream to read an object from.java.io.IOException - If there is an i/o error.java.lang.ClassNotFoundException - If a class cannot be found.public java.lang.String convertToString(SerializedType object) throws java.io.IOException
TextSerializationHandlerconvertToString in interface TextSerializationHandler<SerializedType>object - The object to serialized to a string.java.io.IOException - If there is an i/o error.public java.lang.Object convertFromString(java.lang.String string)
throws java.io.IOException,
java.lang.ClassNotFoundException
TextSerializationHandlerconvertFromString in interface TextSerializationHandler<SerializedType>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.