Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » store » [javadoc | source]
org.apache.lucene.store
abstract public class: InputStream [javadoc | source]
java.lang.Object
   org.apache.lucene.store.InputStream

All Implemented Interfaces:
    Cloneable

Direct Known Subclasses:
    MockInputStream

Abstract base class for input from a file in a Directory . A random-access input stream. Used for all Lucene index input operations.
Field Summary
static final  int BUFFER_SIZE     
protected  long length     
Method from org.apache.lucene.store.InputStream Summary:
clone,   close,   getFilePointer,   length,   readByte,   readBytes,   readChars,   readInt,   readInternal,   readLong,   readString,   readVInt,   readVLong,   seek,   seekInternal
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.store.InputStream Detail:
 public Object clone() 
    Returns a clone of this stream.

    Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

    Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

 abstract public  void close() throws IOException
    Closes the stream to futher operations.
 public final long getFilePointer() 
    Returns the current position in this file, where the next read will occur.
 public final long length() 
    The number of bytes in the file.
 public final byte readByte() throws IOException 
    Reads and returns a single byte.
 public final  void readBytes(byte[] b,
    int offset,
    int len) throws IOException 
    Reads a specified number of bytes into an array at the specified offset.
 public final  void readChars(char[] buffer,
    int start,
    int length) throws IOException 
    Reads UTF-8 encoded characters into an array.
 public final int readInt() throws IOException 
    Reads four bytes and returns an int.
 abstract protected  void readInternal(byte[] b,
    int offset,
    int length) throws IOException
    Expert: implements buffer refill. Reads bytes from the current position in the input.
 public final long readLong() throws IOException 
    Reads eight bytes and returns a long.
 public final String readString() throws IOException 
    Reads a string.
 public final int readVInt() throws IOException 
    Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 public final long readVLong() throws IOException 
    Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 public final  void seek(long pos) throws IOException 
    Sets current position in this file, where the next read will occur.
 abstract protected  void seekInternal(long pos) throws IOException