org.ssonet.io
Interface IOStream

All Known Subinterfaces:
Mechanism
All Known Implementing Classes:
ByteIOStream, AbstractIntegrityMechanism, AbstractAccountabilityMechanism, AbstractConfidentialityMechanism

public interface IOStream

Interface for an Input/Output-Stream for reading and writing objects


Method Summary
 int available()
           
 void closeIn()
          Closes the Inputstream.
 void closeOut()
          Closes the outputStream.
 int read(byte[] buffer)
          Reads an array of bytes from a stream
 void write(byte[] buffer)
          Writes an array of bytes to a stream.
 

Method Detail

read

public int read(byte[] buffer)
         throws java.io.IOException
Reads an array of bytes from a stream
Parameters:
buffer - the buffer, which shall be filled with bytes read
Throws:
java.io.IOException - if an error occures while reading from the stream

write

public void write(byte[] buffer)
           throws java.io.IOException
Writes an array of bytes to a stream.
Parameters:
buffer - the buffer holding the bytes to write to the stream
Throws:
java.io.IOException - if an error occures while writing to the stream

closeIn

public void closeIn()
             throws java.io.IOException
Closes the Inputstream.

closeOut

public void closeOut()
              throws java.io.IOException
Closes the outputStream.

available

public int available()
              throws java.io.IOException