galaxy.io
Class GalaxyOutputStream

java.lang.Object
  |
  +--galaxy.io.GalaxyOutputStream

public class GalaxyOutputStream
extends java.lang.Object

This class provides methods for writing data to a Galaxy Communicator connection.


Constructor Summary
GalaxyOutputStream(java.io.OutputStream out)
          Constructor
 
Method Summary
 void close()
           
 void writeEOT(DisconnectMessage msg)
          Writes a disconnect message to the output stream.
 void writeMessage(GalaxyMessage msg)
          Writes a message to the output stream.
 void writeObject(java.lang.Object obj, int msgType)
          Writes an object to the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GalaxyOutputStream

public GalaxyOutputStream(java.io.OutputStream out)
                   throws java.io.IOException
Constructor
Parameters:
out - the output stream to use
Method Detail

close

public void close()
           throws java.io.IOException

writeMessage

public void writeMessage(GalaxyMessage msg)
                  throws java.io.IOException
Writes a message to the output stream.
Parameters:
msg - the message
Throws:
java.io.IOException - If there is an error writing to the output stream

writeEOT

public void writeEOT(DisconnectMessage msg)
              throws java.io.IOException
Writes a disconnect message to the output stream.
Parameters:
msg - the disconnect message
Throws:
java.io.IOException - If there is an error writing to the output stream

writeObject

public void writeObject(java.lang.Object obj,
                        int msgType)
                 throws java.io.IOException
Writes an object to the output stream.
Parameters:
obj - the object
msgType - the message type (object is encapsulated in a message)
Throws:
java.io.IOException - If there is an error writing to the output stream