org.elasticsearch.common.compress
Class CompressedIndexInput<T extends CompressorContext>
java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.elasticsearch.common.compress.CompressedIndexInput<T>
- All Implemented Interfaces:
- Closeable, Cloneable
- Direct Known Subclasses:
- LZFCompressedIndexInput, SnappyCompressedIndexInput
public abstract class CompressedIndexInput<T extends CompressorContext>
- extends org.apache.lucene.store.IndexInput
Method Summary |
int |
available()
Method is overridden to report number of bytes that can now be read
from decoded data buffer, without reading bytes from the underlying
stream. |
Object |
clone()
|
void |
close()
|
protected abstract void |
doClose()
|
long |
getFilePointer()
|
long |
length()
|
int |
read(byte[] buffer,
int offset,
int length,
boolean fullRead)
|
byte |
readByte()
|
void |
readBytes(byte[] b,
int offset,
int len)
|
protected abstract void |
readHeader(org.apache.lucene.store.IndexInput in)
|
protected boolean |
readyBuffer()
|
void |
seek(long pos)
|
protected abstract int |
uncompress(org.apache.lucene.store.IndexInput in,
byte[] out)
Uncompress the data into the out array, returning the size uncompressed |
Methods inherited from class org.apache.lucene.store.IndexInput |
copyBytes, skipChars, toString |
Methods inherited from class org.apache.lucene.store.DataInput |
readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode |
context
protected final T extends CompressorContext context
uncompressed
protected byte[] uncompressed
uncompressedLength
protected int uncompressedLength
CompressedIndexInput
public CompressedIndexInput(org.apache.lucene.store.IndexInput in,
T context)
throws IOException
- Throws:
IOException
available
public int available()
throws IOException
- Method is overridden to report number of bytes that can now be read
from decoded data buffer, without reading bytes from the underlying
stream.
Never throws an exception; returns number of bytes available without
further reads from underlying source; -1 if stream has been closed, or
0 if an actual read (and possible blocking) is needed to find out.
- Throws:
IOException
readByte
public byte readByte()
throws IOException
- Specified by:
readByte
in class org.apache.lucene.store.DataInput
- Throws:
IOException
read
public int read(byte[] buffer,
int offset,
int length,
boolean fullRead)
throws IOException
- Throws:
IOException
readBytes
public void readBytes(byte[] b,
int offset,
int len)
throws IOException
- Specified by:
readBytes
in class org.apache.lucene.store.DataInput
- Throws:
IOException
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in class org.apache.lucene.store.IndexInput
seek
public void seek(long pos)
throws IOException
- Specified by:
seek
in class org.apache.lucene.store.IndexInput
- Throws:
IOException
length
public long length()
- Specified by:
length
in class org.apache.lucene.store.IndexInput
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class org.apache.lucene.store.IndexInput
- Throws:
IOException
doClose
protected abstract void doClose()
throws IOException
- Throws:
IOException
readyBuffer
protected boolean readyBuffer()
throws IOException
- Throws:
IOException
readHeader
protected abstract void readHeader(org.apache.lucene.store.IndexInput in)
throws IOException
- Throws:
IOException
uncompress
protected abstract int uncompress(org.apache.lucene.store.IndexInput in,
byte[] out)
throws IOException
- Uncompress the data into the out array, returning the size uncompressed
- Throws:
IOException
clone
public Object clone()
- Overrides:
clone
in class org.apache.lucene.store.DataInput
Copyright © 2009-2012. All Rights Reserved.