Class java.io.PipedReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.PipedReader
- public class PipedReader
- extends Reader
Piped character-input streams.
- Since:
- JDK1.1
Constructor Summary
|
PipedReader()
Create a reader that is not yet connected to a piped writer. |
PipedReader(PipedWriter src)
Create a reader for the specified piped character-output stream. |
Method Summary
|
void
|
close()
Close the stream. |
void
|
connect(PipedWriter src)
Connect the specified piped writer to this reader. |
int
|
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
Methods inherited from class java.lang.Object |
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
, wait
, wait
|
PipedReader
public PipedReader()
- Create a reader that is not yet connected to a piped writer.
PipedReader
public PipedReader(PipedWriter src)
throws IOException
- Create a reader for the specified piped character-output stream.
connect
public void connect(PipedWriter src)
throws IOException
- Connect the specified piped writer to this reader.
- Throws:
- IOException - If this reader is already connected
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Read characters into a portion of an array.
- Parameters:
cbuf
- Destination buffer
off
- Offset at which to start storing characters
len
- Maximum number of characters to read- Returns:
- The number of characters read, or -1 if the end of the
stream has been reached
- Throws:
- IOException - If an I/O error occurs
- Overrides:
- read in class Reader
close
public void close()
throws IOException
- Close the stream.
- Throws:
- IOException - If an I/O error occurs
- Overrides:
- close in class Reader
Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.