org.apache.lucene.store
Class NIOFSDirectory.NIOFSIndexInput

java.lang.Object
  extended by org.apache.lucene.store.DataInput
      extended by org.apache.lucene.store.IndexInput
          extended by org.apache.lucene.store.BufferedIndexInput
              extended by org.apache.lucene.store.FSDirectory.FSIndexInput
                  extended by org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput
All Implemented Interfaces:
Closeable, Cloneable
Enclosing class:
NIOFSDirectory

protected static class NIOFSDirectory.NIOFSIndexInput
extends FSDirectory.FSIndexInput

Reads bytes with FileChannel.read(ByteBuffer, long)


Field Summary
 
Fields inherited from class org.apache.lucene.store.FSDirectory.FSIndexInput
end, file, off
 
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
buffer, BUFFER_SIZE, MERGE_BUFFER_SIZE
 
Constructor Summary
NIOFSDirectory.NIOFSIndexInput(File path, IOContext context)
           
NIOFSDirectory.NIOFSIndexInput(String sliceDescription, File path, RandomAccessFile file, FileChannel fc, long off, long length, int bufferSize)
           
 
Method Summary
protected  void newBuffer(byte[] newBuffer)
           
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.FSDirectory.FSIndexInput
clone, close, length
 
Methods inherited from class org.apache.lucene.store.BufferedIndexInput
bufferSize, flushBuffer, getBufferSize, getFilePointer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize
 
Methods inherited from class org.apache.lucene.store.IndexInput
toString
 
Methods inherited from class org.apache.lucene.store.DataInput
readString, readStringSet, readStringStringMap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NIOFSDirectory.NIOFSIndexInput

public NIOFSDirectory.NIOFSIndexInput(File path,
                                      IOContext context)
                               throws IOException
Throws:
IOException

NIOFSDirectory.NIOFSIndexInput

public NIOFSDirectory.NIOFSIndexInput(String sliceDescription,
                                      File path,
                                      RandomAccessFile file,
                                      FileChannel fc,
                                      long off,
                                      long length,
                                      int bufferSize)
Method Detail

newBuffer

protected void newBuffer(byte[] newBuffer)
Overrides:
newBuffer in class BufferedIndexInput

readInternal

protected void readInternal(byte[] b,
                            int offset,
                            int len)
                     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
len - 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)


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