PipedReader


PipedReader java.io

Java 1.1 readable closeable

PipedReader is a character input stream that reads characters from a PipedWriter character output stream to which it is connected. PipedReader implements one half of a pipe and is useful for communication between two threads of an application. A PipedReader cannot be used until it is connected to a PipedWriter object, which may be passed to the PipedReader( ) constructor or to the connect( ) method. PipedReader inherits most of the methods of its superclass. See Reader for more information. PipedReader is the character-stream analog of PipedInputStream .

Figure 9-47. java.io.PipedReader

 public class  PipedReader  extends Reader {  // Public Constructors  public  PipedReader  ( );        public  PipedReader  (PipedWriter  src  ) throws IOException;  // Public Instance Methods  public void  connect  (PipedWriter  src  ) throws IOException;  // Public Methods Overriding Reader  public void  close  ( ) throws IOException;  1.2  public int  read  ( ) throws IOException;  synchronized  public int  read  (char[ ]  cbuf  , int  off  , int  len  ) throws IOException;  synchronized   1.2  public boolean  ready  ( ) throws IOException;  synchronized  } 

Passed To

PipedWriter.{connect( ) , PipedWriter( )}



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net