org.archiviststoolkit.swing
Class ProgressMonitorBufferedReader
java.lang.Object
   java.io.Reader
java.io.Reader
       java.io.BufferedReader
java.io.BufferedReader
           org.archiviststoolkit.swing.ProgressMonitorBufferedReader
org.archiviststoolkit.swing.ProgressMonitorBufferedReader
- All Implemented Interfaces: 
- java.io.Closeable, java.lang.Readable
- public class ProgressMonitorBufferedReader 
- extends java.io.BufferedReader
Allows us to monitor progress on readers.
 
| Fields inherited from class java.io.Reader | 
| lock | 
 
| Constructor Summary | 
| ProgressMonitorBufferedReader(java.awt.Component parent,
                              java.lang.Object message,
                              java.io.Reader reader)Create the monitor stream.
 | 
 
| Method Summary | 
|  void | close()Close our stream and progress monitor.
 | 
|  javax.swing.ProgressMonitor | getProgressMonitor()Get the ProgressMonitor we are using.
 | 
|  java.lang.String | readLine()Read the next line of input.
 | 
 
| Methods inherited from class java.io.BufferedReader | 
| mark, markSupported, read, read, ready, reset, skip | 
 
| Methods inherited from class java.io.Reader | 
| read, read | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ProgressMonitorBufferedReader
public ProgressMonitorBufferedReader(java.awt.Component parent,
                                     java.lang.Object message,
                                     java.io.Reader reader)
- Create the monitor stream.
 
- Parameters:
- parent- The parent of the ProgressMonitor
- message- The message for the Progress Monitor.
                Typically something like "Reading filename..."
- reader- The input stream.
 
getProgressMonitor
public javax.swing.ProgressMonitor getProgressMonitor()
- Get the ProgressMonitor we are using.
 
- 
- Returns:
- the current monitor
 
readLine
public java.lang.String readLine()
                          throws java.io.IOException
- Read the next line of input.
 
- 
- Overrides:
- readLinein class- java.io.BufferedReader
 
- 
- Returns:
- the next line in the stream.
- Throws:
- java.io.IOException- if something really goes wrong
 
close
public void close()
           throws java.io.IOException
- Close our stream and progress monitor.
 
- 
- Specified by:
- closein interface- java.io.Closeable
- Overrides:
- closein class- java.io.BufferedReader
 
- 
- Throws:
- java.io.IOException- if we cant close the underlying stream