Class sfclasses.RelayOutputStream
All Packages Class Hierarchy This Package Previous Next Index
Class sfclasses.RelayOutputStream
java.lang.Object
|
+----java.io.OutputStream
|
+----sfclasses.RelayOutputStream
- public class RelayOutputStream
- extends OutputStream
This class implements an output stream to write data to a firewall system
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.
-
RelayOutputStream(byte[], String)
- Initialize the stream and open the file for writing
-
close()
- Close the file and the output stream.
-
flush()
- Write the buffer to the file.
-
isClosed()
- Check if the output stream is closed.
-
write(int)
- Write one byte to the file.
RelayOutputStream
public RelayOutputStream(byte h[],
String filename)
- Initialize the stream and open the file for writing
- Parameters:
- filename - Name of the file including the full path
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
flush
public void flush() throws IOException
- Write the buffer to the file.
- Overrides:
- flush in class OutputStream
close
public void close() throws IOException
- Close the file and the output stream.
- Overrides:
- close in class OutputStream
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