Package org.apache.lucene.misc.store
Class WindowsDirectory.WindowsIndexInput
java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.apache.lucene.store.BufferedIndexInput
org.apache.lucene.misc.store.WindowsDirectory.WindowsIndexInput
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
,RandomAccessInput
- Enclosing class:
- WindowsDirectory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
(package private) boolean
(package private) boolean
private final long
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
BUFFER_SIZE, MERGE_BUFFER_SIZE, MIN_BUFFER_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
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
Expert: implements buffer refill.protected void
seekInternal
(long pos) Expert: implements seek.Methods inherited from class org.apache.lucene.store.BufferedIndexInput
bufferSize, getBufferSize, getFilePointer, readByte, readByte, readBytes, readBytes, readInt, readInt, readLong, readLong, readShort, readShort, readVInt, readVLong, seek, slice, wrap
Methods inherited from class org.apache.lucene.store.IndexInput
getFullSliceDescription, randomAccessSlice, skipBytes, toString
Methods inherited from class org.apache.lucene.store.DataInput
readFloats, readInts, readLongs, readMapOfStrings, readSetOfStrings, readString, readZInt, readZLong
-
Field Details
-
fd
private final long fd -
length
private final long length -
isClone
boolean isClone -
isOpen
boolean isOpen
-
-
Constructor Details
-
WindowsIndexInput
- Throws:
IOException
-
-
Method Details
-
readInternal
Description copied from class:BufferedIndexInput
Expert: implements buffer refill. Reads bytes from the current position in the input.- Specified by:
readInternal
in classBufferedIndexInput
- Parameters:
b
- the buffer to read bytes into- Throws:
IOException
-
seekInternal
Description copied from class:BufferedIndexInput
Expert: implements seek. Sets current position in this file, where the nextBufferedIndexInput.readInternal(ByteBuffer)
will occur.- Specified by:
seekInternal
in classBufferedIndexInput
- Throws:
IOException
- See Also:
-
close
Description copied from class:IndexInput
Closes the stream to further operations.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classIndexInput
- Throws:
IOException
-
length
public long length()Description copied from class:IndexInput
The number of bytes in the file.- Specified by:
length
in classIndexInput
-
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.
Warning: Lucene never closes cloned
IndexInput
s, it will only callIndexInput.close()
on the original object.If you access the cloned IndexInput after closing the original object, any
readXXX
methods will throwAlreadyClosedException
.This method is NOT thread safe, so if the current
IndexInput
is being used by one thread whileclone
is called by another, disaster could strike.- Overrides:
clone
in classBufferedIndexInput
-