Class sfclasses.LocalOutputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sfclasses.LocalOutputStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----sfclasses.LocalOutputStream

public class LocalOutputStream
extends OutputStream
This class implements an output stream to write data to a local file via the relay. It uses the I/O functions implemented in the Communicator class. Filter streams can be used on top of this stream to enhance functionality.

Constructor Index

 o LocalOutputStream(String)
Initialize the stream and open the file for writing

Method Index

 o close()
Close the file and the output stream.
 o flush()
Write the buffer to the file.
 o isClosed()
Check if the output stream is closed.
 o write(int)
Write one byte to the file.

Constructors

 o LocalOutputStream
  public LocalOutputStream(String filename)
Initialize the stream and open the file for writing
Parameters:
filename - Name of the file including the full path

Methods

 o write
  public void write(int b) throws IOException
Write one byte to the file. The output is buffered and will be written when flush() or close() is called.
Parameters:
b - Byte to write
Overrides:
write in class OutputStream
 o flush
  public void flush() throws IOException
Write the buffer to the file.
Overrides:
flush in class OutputStream
 o close
  public void close() throws IOException
Close the file and the output stream.
Overrides:
close in class OutputStream
 o isClosed
  public boolean isClosed()
Check if the output stream is closed.
Returns:
true if the stream is closed and false if data can be written.

All Packages  Class Hierarchy  This Package  Previous  Next  Index