org.apache.lucene.store
Class WindowsDirectory.WindowsIndexInput

java.lang.Object
  extended by org.apache.lucene.store.IndexInput
      extended by org.apache.lucene.store.BufferedIndexInput
          extended by org.apache.lucene.store.WindowsDirectory.WindowsIndexInput
All Implemented Interfaces:
Closeable, Cloneable
Enclosing class:
WindowsDirectory

protected static class WindowsDirectory.WindowsIndexInput
extends BufferedIndexInput


Field Summary
 
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
buffer, BUFFER_SIZE
 
Fields inherited from class org.apache.lucene.store.IndexInput
copyBuf
 
Constructor Summary
WindowsDirectory.WindowsIndexInput(File file, int bufferSize)
           
 
Method Summary
 Object clone()
          Returns a clone of this stream.
 void close()
          Closes the stream to further operations.
 long length()
          The number of bytes in the file.
protected  void readInternal(byte[] b, int offset, int length)
          Expert: implements buffer refill.
protected  void seekInternal(long pos)
          Expert: implements seek.
 
Methods inherited from class org.apache.lucene.store.BufferedIndexInput
copyBytes, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readLong, readVInt, readVLong, seek, setBufferSize
 
Methods inherited from class org.apache.lucene.store.IndexInput
readChars, readString, readStringStringMap, setModifiedUTF8StringsMode, skipChars
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowsDirectory.WindowsIndexInput

public WindowsDirectory.WindowsIndexInput(File file,
                                          int bufferSize)
                                   throws IOException
Throws:
IOException
Method Detail

readInternal

protected void readInternal(byte[] b,
                            int offset,
                            int length)
                     throws IOException
Description copied from class: BufferedIndexInput
Expert: implements buffer refill. Reads bytes from the current position in the input.

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

seekInternal

protected void seekInternal(long pos)
                     throws IOException
Description copied from class: BufferedIndexInput
Expert: implements seek. Sets current position in this file, where the next BufferedIndexInput.readInternal(byte[],int,int) will occur.

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

close

public void close()
           throws IOException
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput
Throws:
IOException

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput

clone

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


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.