Class java.io.PipedReader
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.io.PipedReader

Object
   |
   +----Reader
           |
           +----java.io.PipedReader

public class PipedReader
extends Reader
Piped character-input streams.

Version:
1.6, 98/07/01
Author:
Mark Reinhold
Since:
JDK1.1

Constructor Index

 o java.io.PipedReader()
Create a reader that is not yet connected to a piped writer.
 o java.io.PipedReader(PipedWriter)
Create a reader for the specified piped character-output stream.

Method Index

 o close()
Close the stream.
 o connect(PipedWriter)
Connect the specified piped writer to this reader.
 o read(char[], int, int)
Read characters into a portion of an array.

Constructors

 o PipedReader
public PipedReader()
Create a reader that is not yet connected to a piped writer.

 o PipedReader
public PipedReader(PipedWriter src) throws IOException
Create a reader for the specified piped character-output stream.

Methods

 o close
public void close() throws IOException
Close the stream.

Throws: IOException
If an I/O error occurs
Overrides:
close in class Reader
 o connect
public void connect(PipedWriter src) throws IOException
Connect the specified piped writer to this reader.

Throws: IOException
If this reader is already connected
 o 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

All Packages  Class Hierarchy  This Package  Previous  Next  Index