THE PACKAGE JAVA.IO
java.io.PipedInputStream
22.5
22.5 The Class
java.io.PipedInputStream
A piped input stream should be connected to a piped output stream; the piped
input stream then provides whatever data bytes are written to the piped output
stream. Typically, data is read from a
PipedInputStream
 object by one thread
and data is written to the corresponding
PipedOutputStream
 ( 22.17) by some
other thread. Attempting to use both objects from a single thread is not recom 
mended, as it may deadlock the thread. The piped input stream contains a buffer,
decoupling read operations from write operations, within limits.
public class PipedInputStream extends InputStream {
public PipedInputStream(PipedOutputStream src)
throws IOException;
public PipedInputStream();
public void connect(PipedOutputStream src)
throws IOException;
public int read() throws IOException;
public int read(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException;
public void close() throws IOException;
}
22.5.1
public PipedInputStream(PipedOutputStream src)
throws IOException
This constructor initializes a newly created
PipedInputStream
 so that it is con 
nected to the piped output stream
src
. Data bytes written to
src
 will then be
available as input from this stream.
22.5.2
public PipedInputStream()
This constructor initializes a newly created
PipedInputStream
 so that it is not
yet connected. It must be connected to a
PipedOutputStream
 before being used.
22.5.3
public void connect(PipedOutputStream src)
throws IOException
The
connect
 method causes this piped input stream to be connected to the piped
output stream
src
. If this object is already connected to some other piped output
stream, an
IOException
 is thrown.
687






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

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