public abstract class ReusedBufferedIndexOutput
extends org.apache.lucene.store.IndexOutput
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
static int |
BUFFER_SIZE |
Constructor and Description |
---|
ReusedBufferedIndexOutput(String resourceDescription) |
ReusedBufferedIndexOutput(String resourceDescription,
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.
|
public static final int BUFFER_SIZE
protected byte[] buffer
public ReusedBufferedIndexOutput(String resourceDescription)
public ReusedBufferedIndexOutput(String resourceDescription, int bufferSize)
protected long getBufferStart()
protected void flushBufferToCache() throws IOException
IOException
protected abstract void closeInternal() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.lucene.store.IndexOutput
IOException
public long getFilePointer()
getFilePointer
in class org.apache.lucene.store.IndexOutput
public void writeByte(byte b) throws IOException
writeByte
in class org.apache.lucene.store.DataOutput
IOException
protected 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 writeIOException
public void writeBytes(byte[] b, int offset, int length) throws IOException
writeBytes
in class org.apache.lucene.store.DataOutput
IOException
Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.