JHotDraw 6.0b1

org.jhotdraw.util
Class StorableOutput

java.lang.Object
  extended by org.jhotdraw.util.StorableOutput

public class StorableOutput
extends java.lang.Object

An output stream that can be used to flatten Storable objects. StorableOutput preserves the object identity of the stored objects.

See Also:
Storable, StorableInput

Constructor Summary
StorableOutput(java.io.OutputStream stream)
          Initializes the StorableOutput with the given output stream.
 
Method Summary
 void close()
          Closes a storable output stream.
 void writeBoolean(boolean b)
          Writes an int to the output stream.
 void writeColor(java.awt.Color c)
           
 void writeDouble(double d)
          Writes an int to the output stream.
 void writeInt(int i)
          Writes an int to the output stream.
 void writeLong(long l)
          Writes a long to the output stream.
 void writeStorable(Storable storable)
          Writes a storable object to the output stream.
 void writeString(java.lang.String s)
          Writes a string to the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorableOutput

public StorableOutput(java.io.OutputStream stream)
Initializes the StorableOutput with the given output stream.

Method Detail

writeStorable

public void writeStorable(Storable storable)
Writes a storable object to the output stream.


writeInt

public void writeInt(int i)
Writes an int to the output stream.


writeLong

public void writeLong(long l)
Writes a long to the output stream.


writeColor

public void writeColor(java.awt.Color c)

writeDouble

public void writeDouble(double d)
Writes an int to the output stream.


writeBoolean

public void writeBoolean(boolean b)
Writes an int to the output stream.


writeString

public void writeString(java.lang.String s)
Writes a string to the output stream. Special characters are quoted.


close

public void close()
Closes a storable output stream.


JHotDraw 6.0b1