public abstract class CustomBufferedIndexInput
extends org.apache.lucene.store.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 |
|---|---|
org.apache.lucene.store.IndexInput |
clone() |
void |
close() |
protected abstract void |
closeInternal() |
protected int |
flushBuffer(org.apache.lucene.store.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.
|
org.apache.lucene.store.IndexInput |
slice(String sliceDescription,
long offset,
long length) |
public static final int BUFFER_SIZE
protected byte[] buffer
public CustomBufferedIndexInput(String resourceDesc)
public CustomBufferedIndexInput(String resourceDesc, int bufferSize)
public byte readByte()
throws IOException
readByte in class org.apache.lucene.store.DataInputIOExceptionpublic void readBytes(byte[] b,
int offset,
int len)
throws IOException
readBytes in class org.apache.lucene.store.DataInputIOExceptionpublic void readBytes(byte[] b,
int offset,
int len,
boolean useBuffer)
throws IOException
readBytes in class org.apache.lucene.store.DataInputIOExceptionpublic int readInt()
throws IOException
readInt in class org.apache.lucene.store.DataInputIOExceptionpublic long readLong()
throws IOException
readLong in class org.apache.lucene.store.DataInputIOExceptionpublic int readVInt()
throws IOException
readVInt in class org.apache.lucene.store.DataInputIOExceptionpublic long readVLong()
throws IOException
readVLong in class org.apache.lucene.store.DataInputIOExceptionpublic final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.store.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 org.apache.lucene.store.IndexInputpublic void seek(long pos)
throws IOException
seek in class org.apache.lucene.store.IndexInputIOExceptionprotected abstract void seekInternal(long pos)
throws IOException
readInternal(byte[],int,int) will occur.IOExceptionreadInternal(byte[],int,int)public org.apache.lucene.store.IndexInput clone()
clone in class org.apache.lucene.store.IndexInputpublic org.apache.lucene.store.IndexInput slice(String sliceDescription, long offset, long length) throws IOException
slice in class org.apache.lucene.store.IndexInputIOExceptionprotected int flushBuffer(org.apache.lucene.store.IndexOutput out,
long numBytes)
throws IOException
numBytes.
NOTE: this method does not refill the buffer, however it does advance the buffer position.
IOExceptionCopyright © 2000–2014 The Apache Software Foundation. All rights reserved.