com.timeindexing.appl
Class IndexInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.timeindexing.appl.IndexInputStream
All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
IndexSelectionInputStream

public class IndexInputStream
extends java.io.InputStream

A InputStream class to get access to data that is in an Index, in situations where an InputStream is needed.


Constructor Summary
IndexInputStream(Index anIndex)
          Construct an IndexInputStream object given an Index.
 
Method Summary
 int read()
          Reads the next byte of data from the input stream.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexInputStream

public IndexInputStream(Index anIndex)
Construct an IndexInputStream object given an Index.

Method Detail

read

public int read()
         throws java.io.IOException
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the Index has been reached, the value -1 is returned.

Specified by:
read in class java.io.InputStream
Returns:
the next byte of data, or -1 if the end of the index is reached.
Throws:
java.io.IOException - if an I/O error occurs.


Timeindexing 2008