|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of data being read and written.public interface Serializer<T>
Defines an interface for writing objects to and reading objects from a data stream.
Method Summary | |
---|---|
String |
getMIMEType(T object)
Returns the MIME type of the data read and written by this serializer. |
T |
readObject(InputStream inputStream)
Reads an object from an input stream. |
void |
writeObject(T object,
OutputStream outputStream)
Writes an object to an output stream. |
Method Detail |
---|
T readObject(InputStream inputStream) throws IOException, SerializationException
inputStream
- The data stream from which the object will be read.
IOException
SerializationException
void writeObject(T object, OutputStream outputStream) throws IOException, SerializationException
object
- The object to serialize.outputStream
- The data stream to which the object will be written.
IOException
SerializationException
String getMIMEType(T object)
object
- If provided, allows the serializer to attach parameters to the returned
MIME type containing more detailed information about the data. If
null, the base MIME type is returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |