sk.uniba.euromath.tools.io
Class PipedExceptionReader
java.lang.Object
  
java.io.Reader
      
java.io.PipedReader
          
sk.uniba.euromath.tools.io.PipedExceptionReader
- All Implemented Interfaces: 
 - Closeable, Readable
 
public final class PipedExceptionReader
- extends PipedReader
 
Functionally identical to PipedReader, except that when an exception
 is caught in the producer thread (the thread that writes data to associated
 PipedWriter) and it is registered in the registry then all
 read() methods will fail with the registered exception. For
 further details please see the documentation of ExceptionRegistry.
- Author:
 
  - Martin Vysny
 
 
 
 
| 
Method Summary | 
 int | 
read()
 
            | 
 int | 
read(char[] cbuf,
     int off,
     int len)
 
            | 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
registry
public final ExceptionRegistry registry
- If exception in producer occurs then record it here before thread
 termination. It will then be linked as cause of exception thrown by all
 
read() methods.
 
PipedExceptionReader
public PipedExceptionReader()
- Constructor.
 
PipedExceptionReader
public PipedExceptionReader(PipedWriter src)
                     throws IOException
- Constructor.
- Parameters:
 src - source.
- Throws:
 IOException
 
read
public int read()
         throws IOException
- Overrides:
 read in class PipedReader
 
- Throws:
 IOException
 
read
public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
- Overrides:
 read in class PipedReader
 
- Throws:
 IOException
 
Copyright 2003-2003-2006 null. All Rights Reserved.