|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.elasticsearch.common.io.stream.StreamInput org.elasticsearch.common.compress.CompressedStreamInput<T>
public abstract class CompressedStreamInput<T extends CompressorContext>
Field Summary | |
---|---|
protected CompressorContext |
context
|
protected byte[] |
uncompressed
|
Constructor Summary | |
---|---|
CompressedStreamInput(StreamInput in,
T context)
|
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. |
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 in)
|
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. |
protected abstract int |
uncompress(StreamInput in,
byte[] out)
Uncompress the data into the out array, returning the size uncompressed |
Methods inherited from class org.elasticsearch.common.io.stream.StreamInput |
---|
readBoolean, readBytesReference, readBytesReference, readDouble, readFloat, readFully, readGenericValue, readInt, readLong, readMap, readOptionalString, readOptionalUTF, readShort, readString, readStringArray, readText, readUTF, readVInt, readVLong |
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, read, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final CompressorContext context
protected byte[] uncompressed
Constructor Detail |
---|
public CompressedStreamInput(StreamInput in, T context) throws IOException
IOException
Method Detail |
---|
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 intooffset
- the offset in the array to start storing byteslen
- 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 class StreamInput
IOException
protected abstract void doClose() throws IOException
IOException
protected boolean readyBuffer() throws IOException
IOException
protected abstract void readHeader(StreamInput in) throws IOException
IOException
protected abstract int uncompress(StreamInput in, byte[] out) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |