|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--java.io.PipedOutputStream
Piped output stream, must be connected to a PipedInputStream. A thread reading from a PipedInputStream receives data from a thread writing to the PipedOutputStream it is connected to.
PipedInputStream
Constructor Summary | |
PipedOutputStream()
Creates an output file that isn't connected to anything (yet). |
|
PipedOutputStream(PipedInputStream snk)
Creates an output file connected to the specified PipedInputStream. |
Method Summary | |
void |
close()
Closes the stream. |
void |
connect(PipedInputStream snk)
Connect this output stream to a receiver. |
void |
flush()
Flushes the stream. |
void |
write(byte[] b,
int off,
int len)
Writes a sub array of bytes. |
void |
write(int b)
Write a byte. |
Methods inherited from class java.io.OutputStream |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PipedOutputStream(PipedInputStream snk) throws IOException
snk
- The InputStream to connect to.public PipedOutputStream()
Method Detail |
public void connect(PipedInputStream snk) throws IOException
snk
- The InputStream to connect to.
IOException
public void write(int b) throws IOException
write
in class OutputStream
b
- the byte to be written
IOException
- If an I/O error has occurred.public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
b
- the data to be writtenoff
- the start offset in the datalen
- the number of bytes that are written
IOException
- If an I/O error has occurred.public void flush() throws IOException
flush
in class OutputStream
IOException
- If an I/O error has occurred.public void close() throws IOException
close
in class OutputStream
IOException
- If an I/O error has occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |