Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.lucene.index
Class CompoundFileReader.CSInputStream  view CompoundFileReader.CSInputStream download CompoundFileReader.CSInputStream.java

java.lang.Object
  extended byorg.apache.lucene.store.InputStream
      extended byorg.apache.lucene.index.CompoundFileReader.CSInputStream
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
CompoundFileReader

static final class CompoundFileReader.CSInputStream
extends org.apache.lucene.store.InputStream

Implementation of an InputStream that reads from a portion of the compound file. The visibility is left as "package" *only* because this helps with testing since JUnit test cases in a different class can then access package fields of this class.


Field Summary
(package private)  org.apache.lucene.store.InputStream base
           
(package private)  long fileOffset
           
 
Fields inherited from class org.apache.lucene.store.InputStream
length
 
Constructor Summary
(package private) CompoundFileReader.CSInputStream(org.apache.lucene.store.InputStream base, long fileOffset, long length)
           
 
Method Summary
 void close()
          Closes the stream to futher operations.
protected  void readInternal(byte[] b, int offset, int len)
          Expert: implements buffer refill.
protected  void seekInternal(long pos)
          Expert: implements seek.
 
Methods inherited from class org.apache.lucene.store.InputStream
clone, getFilePointer, length, readByte, readBytes, readChars, readInt, readLong, readString, readVInt, readVLong, seek
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base

org.apache.lucene.store.InputStream base

fileOffset

long fileOffset
Constructor Detail

CompoundFileReader.CSInputStream

CompoundFileReader.CSInputStream(org.apache.lucene.store.InputStream base,
                                 long fileOffset,
                                 long length)
                           throws java.io.IOException
Method Detail

readInternal

protected void readInternal(byte[] b,
                            int offset,
                            int len)
                     throws java.io.IOException
Expert: implements buffer refill. Reads bytes from the current position in the input.


seekInternal

protected void seekInternal(long pos)
                     throws java.io.IOException
Expert: implements seek. Sets current position in this file, where the next readInternal(byte[],int,int) 55 will occur.


close

public void close()
           throws java.io.IOException
Closes the stream to futher operations.