Node Director
Public Member Functions | Protected Member Functions | List of all members
sfi.director.util.DataTransferInputStream Class Reference

Used for program internal data streams. More...

Inheritance diagram for sfi.director.util.DataTransferInputStream:
sfi.director.util.DataTransferHooker

Public Member Functions

 DataTransferInputStream ()
void push (final byte[] data) throws IOException
 Push a byte array of data on the writer side.
synchronized void push (final byte[] data, int start, int length) throws IOException
synchronized void done ()
 Close the stream (writer side).
boolean markSupported ()
synchronized int available ()
synchronized void close ()
synchronized int read () throws IOException
synchronized int read (byte[] data) throws IOException
synchronized int read (byte[] data, int off, int len) throws IOException
int maxBuffer ()
void maxBuffer (int newsize)

Protected Member Functions

synchronized void senderWait () throws InterruptedException

Detailed Description

Used for program internal data streams.

Provides more or less the same functionality as Piped{Input,Output}Stream, but works IMHO more consistently.

On the writer side you push data into the stream via the push() method and close the * stream via done(). If you need a OutputStream on the writer side then use a connected DataTransferOutputStream.

Unlike Piped*Stream DataTransfer*Stream will report end-of-file (or IOExceptions) to the reading end as soon as all the data has been read and the writer side has called done().

Constructor & Destructor Documentation

sfi.director.util.DataTransferInputStream.DataTransferInputStream ( )

Member Function Documentation

synchronized int sfi.director.util.DataTransferInputStream.available ( )
synchronized void sfi.director.util.DataTransferInputStream.close ( )
synchronized void sfi.director.util.DataTransferInputStream.done ( )
boolean sfi.director.util.DataTransferInputStream.markSupported ( )
int sfi.director.util.DataTransferInputStream.maxBuffer ( )
void sfi.director.util.DataTransferInputStream.maxBuffer ( int  newsize)
void sfi.director.util.DataTransferInputStream.push ( final byte[]  data) throws IOException

Push a byte array of data on the writer side.

Referenced by sfi.director.retriever.CfgFileRetriever.reader(), and sfi.director.util.DataTransferOutputStream.write().

synchronized void sfi.director.util.DataTransferInputStream.push ( final byte[]  data,
int  start,
int  length 
) throws IOException
synchronized int sfi.director.util.DataTransferInputStream.read ( ) throws IOException
synchronized int sfi.director.util.DataTransferInputStream.read ( byte[]  data) throws IOException
synchronized int sfi.director.util.DataTransferInputStream.read ( byte[]  data,
int  off,
int  len 
) throws IOException
synchronized void sfi.director.util.DataTransferInputStream.senderWait ( ) throws InterruptedException
protected

The documentation for this class was generated from the following file: