THE PACKAGE JAVA.IO
java.io.PipedOutputStream
22.17
22.17 The Class
java.io.PipedOutputStream
A piped output stream should be connected to a piped input stream; the piped
input stream then provides whatever data bytes are written to the piped output
stream. Typically, data is written to a
PipeOutputStream
object by one thread
and data is read from the corresponding
PipedInputStream
( 22.5) by some
other thread. Attempting to use both objects from a single thread is not recom
mended, as it may deadlock the thread.
public class PipedOutputStream extends OutputStream {
public PipedOutputStream(PipedInputStream snk)
throws IOException;
public PipedOutputStream();
public void connect(PipedInputStream snk)
throws IOException;
public void write(int b) throws IOException;
public void write(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException;
public void close() throws IOException;
}
22.17.1
public PipedOutputStream(PipedInputStream snk)
throws IOException
This constructor initializes a newly created
PipedOutputStream
so that it is con
nected to the piped input stream
snk
. Data bytes written to this stream will then be
available as input from
snk
.
22.17.2
public PipedOutputStream()
This constructor initializes a newly created
PipedOutputStream
so that it is not
yet connected. It must be connected to a
PipedInputStream
before being used.
22.17.3
public void connect(PipedInputStream snk)
throws IOException
The
connect
method causes this piped output stream to be connected to the piped
input stream
snk
. If this object is already connected to some other piped input
stream, an
IOException
is thrown.
725
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved