org.basex.io.in
Class LookupInput

java.lang.Object
  extended by java.io.InputStream
      extended by org.basex.io.in.LookupInput
All Implemented Interfaces:
java.io.Closeable

public final class LookupInput
extends java.io.InputStream

This input stream allows a lookup of the next byte to be returned by an InputStream reference.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Constructor Summary
LookupInput(java.io.InputStream in)
          Constructor.
 
Method Summary
 void close()
           
 int lookup()
          Returns the current (next) value.
 int read()
           
 
Methods inherited from class java.io.InputStream
available, 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

LookupInput

public LookupInput(java.io.InputStream in)
            throws java.io.IOException
Constructor.

Parameters:
in - buffer input to be wrapped
Throws:
java.io.IOException - I/O exception
Method Detail

lookup

public int lookup()
Returns the current (next) value.

Returns:
current value

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException