public abstract class ReusedBufferedIndexOutput extends IndexOutput
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer |
static int |
BUFFER_SIZE |
| Constructor and Description |
|---|
ReusedBufferedIndexOutput(String resourceDescription,
String name) |
ReusedBufferedIndexOutput(String resourceDescription,
String name,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
closeInternal() |
protected void |
flushBufferToCache()
Write the buffered bytes to cache
|
protected long |
getBufferStart() |
long |
getFilePointer() |
void |
writeByte(byte b) |
void |
writeBytes(byte[] b,
int offset,
int length) |
protected abstract void |
writeInternal(byte[] b,
int offset,
int length)
Expert: implements buffer flushing to cache.
|
getChecksum, getName, toStringcopyBytes, writeBytes, writeInt, writeLong, writeMapOfStrings, writeSetOfStrings, writeShort, writeString, writeVInt, writeVLong, writeZInt, writeZLongpublic static final int BUFFER_SIZE
protected byte[] buffer
protected long getBufferStart()
protected void flushBufferToCache()
throws IOException
IOExceptionprotected abstract void closeInternal()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class IndexOutputIOExceptionpublic long getFilePointer()
getFilePointer in class IndexOutputpublic void writeByte(byte b)
throws IOException
writeByte in class DataOutputIOExceptionprotected abstract void writeInternal(byte[] b,
int offset,
int length)
throws IOException
b - the array of bytes to writeoffset - the offset in the array of bytes to writelength - the number of bytes to writeIOExceptionpublic void writeBytes(byte[] b,
int offset,
int length)
throws IOException
writeBytes in class DataOutputIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.