sfi.director.util.DataTransferInputStream Class Reference

Inheritance diagram for sfi.director.util.DataTransferInputStream:

sfi.director.util.DataTransferHooker List of all members.

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().


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

Package Attributes

Vector buffer = new Vector()
boolean eof = false
int buffersize = 0
int maxBuffer = 1024*1024
int readPosition = 0


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  ) 
 

Close the stream (writer side).

boolean sfi.director.util.DataTransferInputStream.markSupported  ) 
 

void sfi.director.util.DataTransferInputStream.maxBuffer int  newsize  ) 
 

int sfi.director.util.DataTransferInputStream.maxBuffer  ) 
 

synchronized void sfi.director.util.DataTransferInputStream.push final byte[]  data,
int  start,
int  length
throws IOException
 

void sfi.director.util.DataTransferInputStream.push final byte[]  data  )  throws IOException
 

Push a byte array of data on the writer side.

synchronized int sfi.director.util.DataTransferInputStream.read byte[]  data,
int  off,
int  len
throws IOException
 

Reimplemented in sfi.director.util.DataTransferHooker.

synchronized int sfi.director.util.DataTransferInputStream.read byte[]  data  )  throws IOException
 

Reimplemented in sfi.director.util.DataTransferHooker.

synchronized int sfi.director.util.DataTransferInputStream.read  )  throws IOException
 

Reimplemented in sfi.director.util.DataTransferHooker.

synchronized void sfi.director.util.DataTransferInputStream.senderWait  )  throws InterruptedException [protected]
 

Reimplemented in sfi.director.util.DataTransferHooker.


Member Data Documentation

Vector sfi.director.util.DataTransferInputStream.buffer = new Vector() [package]
 

int sfi.director.util.DataTransferInputStream.buffersize = 0 [package]
 

boolean sfi.director.util.DataTransferInputStream.eof = false [package]
 

int sfi.director.util.DataTransferInputStream.maxBuffer = 1024*1024 [package]
 

int sfi.director.util.DataTransferInputStream.readPosition = 0 [package]
 


The documentation for this class was generated from the following file:
Generated on Sat May 19 01:20:00 2012 for Node Director by  doxygen 1.4.5