public class DbIndexInput extends IndexInput
Modifier and Type | Field and Description |
---|---|
protected Block |
block |
protected DbDirectory |
directory |
protected File |
file |
protected long |
length |
protected long |
position |
Modifier | Constructor and Description |
---|---|
protected |
DbIndexInput(DbDirectory directory,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of this stream.
|
void |
close()
Closes the stream to further operations.
|
long |
getFilePointer()
Returns the current position in this file, where the next read will
occur.
|
long |
length()
The number of bytes in the file.
|
byte |
readByte()
Reads and returns a single byte.
|
void |
readBytes(byte[] b,
int offset,
int len)
Reads a specified number of bytes into an array at the specified offset.
|
void |
seek(long pos)
Sets current position in this file, where the next read will occur.
|
readBytes, readChars, readInt, readLong, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode, skipChars
protected long position
protected long length
protected DbDirectory directory
protected Block block
protected File file
protected DbIndexInput(DbDirectory directory, java.lang.String name) throws java.io.IOException
java.io.IOException
public java.lang.Object clone()
IndexInput
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.
clone
in class IndexInput
public void close() throws java.io.IOException
IndexInput
close
in class IndexInput
java.io.IOException
public long length()
IndexInput
length
in class IndexInput
public byte readByte() throws java.io.IOException
IndexInput
readByte
in class IndexInput
java.io.IOException
IndexOutput.writeByte(byte)
public void readBytes(byte[] b, int offset, int len) throws java.io.IOException
IndexInput
readBytes
in class IndexInput
b
- the array to read bytes intooffset
- the offset in the array to start storing byteslen
- the number of bytes to readjava.io.IOException
IndexOutput.writeBytes(byte[],int)
public void seek(long pos) throws java.io.IOException
IndexInput
seek
in class IndexInput
java.io.IOException
IndexInput.getFilePointer()
public long getFilePointer()
IndexInput
getFilePointer
in class IndexInput
IndexInput.seek(long)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.