public abstract class ReusedBufferedIndexOutput extends IndexOutput
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
static int |
BUFFER_SIZE |
Constructor and Description |
---|
ReusedBufferedIndexOutput() |
ReusedBufferedIndexOutput(int bufferSize) |
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
void |
close() |
protected abstract void |
closeInternal() |
void |
flush() |
protected abstract void |
flushInternal() |
protected long |
getBufferStart() |
long |
getFilePointer() |
long |
length() |
void |
seek(long pos) |
protected abstract void |
seekInternal(long pos) |
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.
|
setLength
copyBytes, writeBytes, writeInt, writeLong, writeShort, writeString, writeStringSet, writeStringStringMap, writeVInt, writeVLong
public static final int BUFFER_SIZE
protected byte[] buffer
public ReusedBufferedIndexOutput()
public ReusedBufferedIndexOutput(int bufferSize)
protected long getBufferStart()
protected abstract void flushInternal() throws IOException
IOException
public void flush() throws IOException
flush
in class IndexOutput
IOException
protected abstract void closeInternal() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in class IndexOutput
IOException
public long getFilePointer()
getFilePointer
in class IndexOutput
protected abstract void seekInternal(long pos) throws IOException
IOException
public void seek(long pos) throws IOException
seek
in class IndexOutput
IOException
public long length() throws IOException
length
in class IndexOutput
IOException
public void writeByte(byte b) throws IOException
writeByte
in class 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 DataOutput
IOException
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.