public abstract class CustomBufferedIndexInput extends IndexInput
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer |
static int |
BUFFER_SIZE |
| Constructor and Description |
|---|
CustomBufferedIndexInput(String resourceDesc) |
CustomBufferedIndexInput(String resourceDesc,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
IndexInput |
clone() |
void |
close() |
protected abstract void |
closeInternal() |
protected int |
flushBuffer(IndexOutput out,
long numBytes)
Flushes the in-memory bufer to the given output, copying at most
numBytes. |
long |
getFilePointer() |
byte |
readByte() |
void |
readBytes(byte[] b,
int offset,
int len) |
void |
readBytes(byte[] b,
int offset,
int len,
boolean useBuffer) |
int |
readInt() |
protected abstract void |
readInternal(byte[] b,
int offset,
int length)
Expert: implements buffer refill.
|
long |
readLong() |
int |
readVInt() |
long |
readVLong() |
void |
seek(long pos) |
protected abstract void |
seekInternal(long pos)
Expert: implements seek.
|
IndexInput |
slice(String sliceDescription,
long offset,
long length) |
getFullSliceDescription, length, randomAccessSlice, toStringreadLELongs, readMapOfStrings, readSetOfStrings, readShort, readString, readZInt, readZLong, skipBytespublic CustomBufferedIndexInput(String resourceDesc)
public CustomBufferedIndexInput(String resourceDesc, int bufferSize)
public byte readByte()
throws IOException
readByte in class DataInputIOExceptionpublic void readBytes(byte[] b,
int offset,
int len)
throws IOException
readBytes in class DataInputIOExceptionpublic void readBytes(byte[] b,
int offset,
int len,
boolean useBuffer)
throws IOException
readBytes in class DataInputIOExceptionpublic int readInt()
throws IOException
readInt in class DataInputIOExceptionpublic long readLong()
throws IOException
readLong in class DataInputIOExceptionpublic int readVInt()
throws IOException
readVInt in class DataInputIOExceptionpublic long readVLong()
throws IOException
readVLong in class DataInputIOExceptionpublic final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class IndexInputIOExceptionprotected abstract void closeInternal()
throws IOException
IOExceptionprotected abstract void readInternal(byte[] b,
int offset,
int length)
throws IOException
b - the array to read bytes intooffset - the offset in the array to start storing byteslength - the number of bytes to readIOExceptionpublic long getFilePointer()
getFilePointer in class IndexInputpublic void seek(long pos)
throws IOException
seek in class IndexInputIOExceptionprotected abstract void seekInternal(long pos)
throws IOException
readInternal(byte[],int,int) will occur.IOExceptionreadInternal(byte[],int,int)public IndexInput clone()
clone in class IndexInputpublic IndexInput slice(String sliceDescription, long offset, long length) throws IOException
slice in class IndexInputIOExceptionprotected int flushBuffer(IndexOutput out, long numBytes) throws IOException
numBytes.
NOTE: this method does not refill the buffer, however it does advance the buffer position.
IOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.