All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdsu.io.StringizableWriter

java.lang.Object
   |
   +----sdsu.io.StringizableWriter

public class StringizableWriter
extends Object
Writes objects that implement the Stringizable inteface to a stream(or writer). The object is converted to a string which can be used to recreate the object. A StringizableReader can be used to recreate the objects saved by StringizableWriter.

Note while StringizableWriter uses the name Writer it is NOT a subclass of Writer. The class acts like a Writer but it does not make sense to allow arbitrary writes to a the stream, as it will corrupt the object format.

Version:
0.8 7 January 1998
Author:
Roger Whitney (whitney@cs.sdsu.edu)
See Also:
Stringizable, StringizableReader

Constructor Index

 o StringizableWriter(Writer)
 o StringizableWriter(Writer, String)

Method Index

 o close()
Close the stream StringizableWriter is writing on.
 o flush()
Flush the stream StringizableWriter is writing on.
 o writeObject(Stringizable)
Write the object on the output stream.
 o writeObject(Stringizable, String)
Write the object on the output stream and attach the label to the object.
 o writeObject(Stringizable, String, String)
Write the object and attached label and comment on the output stream.

Constructors

 o StringizableWriter
 public StringizableWriter(Writer out)
 o StringizableWriter
 public StringizableWriter(Writer out,
                           String objectSeparator) throws IOException

Methods

 o close
 public void close() throws IOException
Close the stream StringizableWriter is writing on.

 o flush
 public void flush() throws IOException
Flush the stream StringizableWriter is writing on.

 o writeObject
 public void writeObject(Stringizable object) throws IOException
Write the object on the output stream. Object can be read by StringizableReader.

 o writeObject
 public void writeObject(Stringizable object,
                         String label) throws IOException
Write the object on the output stream and attach the label to the object. Object and label can be read by StringizableReader.

 o writeObject
 public void writeObject(Stringizable object,
                         String label,
                         String comment) throws IOException
Write the object and attached label and comment on the output stream. Object, label, and comment can be read by StringizableReader.


All Packages  Class Hierarchy  This Package  Previous  Next  Index