de.jface.remind.io
Class Serializer

java.lang.Object
  |
  +--de.jface.remind.io.Serializer
Direct Known Subclasses:
XMLSerializer

public abstract class Serializer
extends java.lang.Object

Class Serializer of project RemotePostIt.

Version:
$Revision: 1.1.1.1 $
Author:
Moritz Petersen

Constructor Summary
Serializer()
           
 
Method Summary
abstract  java.util.Collection deserialize(java.io.InputStream in)
          Decodes the data, read from the InputStream into a Collection.
static Serializer getInstance()
          Returns a new instance of the Serializer.
abstract  java.io.InputStream serialize(java.util.Collection notes)
          Returns a Stream, containing the serialized notes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializer

public Serializer()
Method Detail

deserialize

public abstract java.util.Collection deserialize(java.io.InputStream in)
                                          throws SerializerException
Decodes the data, read from the InputStream into a Collection. The created Collection only contains elements of type Note.
Parameters:
in - the InputStream that is decoded into the Collection of Note objects.
Returns:
a Collection containing only Note objects.

serialize

public abstract java.io.InputStream serialize(java.util.Collection notes)
                                       throws SerializerException
Returns a Stream, containing the serialized notes. The stream is an InputStream, from which the serialized notes can be read.
Parameters:
notes - A Collection. Only Note objects are considered in writing to the InputStream.
Returns:
an InputStream from which the serialized notes can be read.

getInstance

public static Serializer getInstance()
Returns a new instance of the Serializer.
Returns:
a new instance of the Serializer or null if the Serializer could not be created.


Copyright © 2002-2002 Moritz Petersen. All Rights Reserved.