gate.creole.annic.apache.lucene.store
Class FSInputStream

java.lang.Object
  extended by gate.creole.annic.apache.lucene.store.InputStream
      extended by gate.creole.annic.apache.lucene.store.FSInputStream
All Implemented Interfaces:
Cloneable

final class FSInputStream
extends InputStream


Nested Class Summary
private  class FSInputStream.Descriptor
           
 
Field Summary
(package private)  FSInputStream.Descriptor file
           
(package private)  boolean isClone
           
 
Fields inherited from class gate.creole.annic.apache.lucene.store.InputStream
BUFFER_SIZE, length
 
Constructor Summary
FSInputStream(File path)
           
 
Method Summary
 Object clone()
          Returns a clone of this stream.
 void close()
          Closes the stream to futher operations.
protected  void finalize()
           
(package private)  boolean isFDValid()
          Method used for testing.
protected  void readInternal(byte[] b, int offset, int len)
          InputStream methods
protected  void seekInternal(long position)
          Random-access methods
 
Methods inherited from class gate.creole.annic.apache.lucene.store.InputStream
getFilePointer, length, readByte, readBytes, readChars, readInt, readLong, readString, readVInt, readVLong, seek
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

FSInputStream.Descriptor file

isClone

boolean isClone
Constructor Detail

FSInputStream

public FSInputStream(File path)
              throws IOException
Throws:
IOException
Method Detail

readInternal

protected final void readInternal(byte[] b,
                                  int offset,
                                  int len)
                           throws IOException
InputStream methods

Specified by:
readInternal in class InputStream
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException

close

public final void close()
                 throws IOException
Description copied from class: InputStream
Closes the stream to futher operations.

Specified by:
close in class InputStream
Throws:
IOException

seekInternal

protected final void seekInternal(long position)
                           throws IOException
Random-access methods

Specified by:
seekInternal in class InputStream
Throws:
IOException
See Also:
InputStream.readInternal(byte[],int,int)

finalize

protected final void finalize()
                       throws IOException
Overrides:
finalize in class Object
Throws:
IOException

clone

public Object clone()
Description copied from class: InputStream
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.

Overrides:
clone in class InputStream

isFDValid

boolean isFDValid()
            throws IOException
Method used for testing. Returns true if the underlying file descriptor is valid.

Throws:
IOException