public abstract class CompressedStreamInput<T extends CompressorContext> extends StreamInput
| Modifier and Type | Field and Description |
|---|---|
protected CompressorContext |
context
|
protected byte[] |
uncompressed
|
| Constructor and Description |
|---|
CompressedStreamInput(StreamInput
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
close()
Closes the stream to further operations.
|
protected abstract void |
doClose()
|
int |
read()
|
int |
read(byte[] buffer, int offset, int length)
|
int |
read(byte[] buffer, int offset, int length, boolean fullRead)
|
byte |
readByte()
Reads and returns a single byte.
|
void |
readBytes(byte[] b, int offset, int len)
Reads a specified number of bytes into an array at the specified offset.
|
protected abstract void |
readHeader(StreamInput
|
protected boolean |
readyBuffer()
Fill the uncompressed bytes buffer by reading the underlying inputStream.
|
void |
reset()
Resets the stream.
|
void |
resetToBufferStart()
Expert!, resets to buffer start, without the need to decompress it again.
|
StreamInput |
setVersion(Version
|
protected abstract int |
uncompress(StreamInput
Uncompress the data into the out array, returning the size uncompressed
|
getVersion, readBoolean, readByteArray, readBytesRef, readBytesRef, readBytesReference, readBytesReference, readDouble, readDoubleArray, readFloat, readFloatArray, readFully, readGenericValue, readInt, readIntArray, readLong, readLongArray, readMap, readOptionalBoolean, readOptionalSharedString, readOptionalStreamable, readOptionalString, readOptionalText, readSharedString, readSharedText, readShort, readString, readStringArray, readText, readTextArray, readVInt, readVLongmark, markSupported, read, skipprotected final CompressorContextcontext
protected byte[] uncompressed
public CompressedStreamInput(StreamInputin, T context) throws IOException
IOException
public StreamInputsetVersion(Version version)
public void resetToBufferStart()
public int available()
throws IOException
available in class
InputStream
IOException
public int read()
throws IOException
read in class
InputStream
IOException
public byte readByte()
throws IOException
StreamInput
readByte in class
StreamInput
IOException
public int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class
InputStream
IOException
public int read(byte[] buffer,
int offset,
int length,
boolean fullRead)
throws IOException
IOException
public void readBytes(byte[] b,
int offset,
int len)
throws IOException
StreamInput
readBytes in class
StreamInput
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
IOException
public void reset()
throws IOException
StreamInput
reset in class
StreamInput
IOException
public void close()
throws IOException
StreamInput
close in interface
Closeable
close in interface
AutoCloseable
close in class
StreamInput
IOException
protected abstract void doClose()
throws IOException
IOException
protected boolean readyBuffer()
throws IOException
IOException
protected abstract void readHeader(StreamInputin) throws IOException
IOException
protected abstract int uncompress(StreamInputin, byte[] out) throws IOException
IOException