gov.nih.nlm.util
Class MultiplePathReader

java.lang.Object
  extended bygov.nih.nlm.util.MultiplePathReader

public class MultiplePathReader
extends Object

Author:
Brian Carlsen, Deborah Shapiro

Constructor Summary
MultiplePathReader(BufferedReader[] readers)
          Instantiates a MultiplePathReader from the component BufferedReaders.
 
Method Summary
 void close()
          Close the MultiplePathReader.
 void mark(int read_ahead_limit)
          Mark the present position in the stream.
 String readLine()
          Read a line of text from the current BufferedReader.
 void reset()
          Reset the stream to the most recent mark.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiplePathReader

public MultiplePathReader(BufferedReader[] readers)
Instantiates a MultiplePathReader from the component BufferedReaders.

Parameters:
readers - array of BufferedReaders
Method Detail

readLine

public String readLine()
                throws IOException
Read a line of text from the current BufferedReader. Increment to return lines from the next BufferedReader when the current one returns null.

Returns:
line of text String
Throws:
IOException

close

public void close()
           throws IOException
Close the MultiplePathReader.

Throws:
IOException

mark

public void mark(int read_ahead_limit)
          throws IOException
Mark the present position in the stream.

Parameters:
read_ahead_limit - limit on the number of characters that may be read while still preserving the mark
Throws:
IOException

reset

public void reset()
           throws IOException
Reset the stream to the most recent mark.

Throws:
IOException


Copyright ©2005