rcs.utils
Class CorrectedPipedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by rcs.utils.CorrectedPipedOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class CorrectedPipedOutputStream
extends java.io.OutputStream

This class provides the same interface as java.io.PipedOutputStream except that it corrects the problem that when java.io.PipedOutputStream has 1k or more written to it, it blocks until the some of the data is read from the input pipe before more can be written. CorrectedPipedInputStream/CorrectedPipedOutputStream only block for mutual exclusion but will allow any amount of data(atleast until you run out of memory) to be written to the pipe without waiting for a read.

 Related Documentation:
 RCS Library, NML Programmers Guide (Java Version)


 

See Also:
CorrectedPipedInputStream

Constructor Summary
CorrectedPipedOutputStream()
           
CorrectedPipedOutputStream(rcs.utils.CorrectedPipedInputStreamInterface in)
           
 
Method Summary
 void close()
           
 rcs.utils.CorrectedPipeData get_pipe_data()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorrectedPipedOutputStream

public CorrectedPipedOutputStream()

CorrectedPipedOutputStream

public CorrectedPipedOutputStream(rcs.utils.CorrectedPipedInputStreamInterface in)
Method Detail

get_pipe_data

public rcs.utils.CorrectedPipeData get_pipe_data()

close

public void close()
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException