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

Class sfclasses.RelayInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----sfclasses.RelayInputStream

public class RelayInputStream
extends InputStream
This class implements an input stream to read data from 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.

Constructor Index

 o RelayInputStream(byte[], String)
Initialize the stream and request the file from the firewall.

Method Index

 o available()
Return number of bytes available for reading.
 o close()
Close the input stream.
 o isEOF()
Check if the end of the file has been reached.
 o read()
Read one byte from the input stream

Constructors

 o RelayInputStream
  public RelayInputStream(byte h[],
                          String filename)
Initialize the stream and request the file from the firewall.
Parameters:
h - IP address of the firewall
filename - Name of the file to read including the full path name. The file must be in the configuration directory /etc/firewall.d or in the log directory /var/log.

Methods

 o read
  public int read() throws IOException
Read one byte from the input stream
Returns:
read byte or -1 on error
Overrides:
read in class InputStream
 o close
  public void close() throws IOException
Close the input stream.
Overrides:
close in class InputStream
 o available
  public int available()
Return number of bytes available for reading. If the buffer is empty but the end of the file is not reached, 1 is returned.
Overrides:
available in class InputStream
 o isEOF
  public boolean isEOF()
Check if the end of the file has been reached.
Returns:
true if EOF, false otherwise

All Packages  Class Hierarchy  This Package  Previous  Next  Index