public abstract class CompressedStreamInput extends StreamInput
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
uncompressed |
| Constructor and Description |
|---|
CompressedStreamInput(StreamInput in) |
| 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 in) |
protected boolean |
readyBuffer()
Fill the uncompressed bytes buffer by reading the underlying inputStream.
|
void |
reset()
Resets the stream.
|
void |
setVersion(Version version) |
protected abstract int |
uncompress(StreamInput in,
byte[] out)
Uncompress the data into the out array, returning the size uncompressed
|
getVersion, readBoolean, readByteArray, readBytesRef, readBytesRef, readBytesReference, readBytesReference, readDouble, readDoubleArray, readFloat, readFloatArray, readFully, readGenericValue, readGeoPoint, readInt, readIntArray, readList, readLong, readLongArray, readMap, readOptionalBoolean, readOptionalStreamable, readOptionalString, readOptionalText, readOptionalVInt, readShort, readString, readStringArray, readTaskStatus, readText, readThrowable, readVInt, readVIntArray, readVLong, readVLongArray, wrap, wrap, wrapmark, markSupported, read, skippublic CompressedStreamInput(StreamInput in) throws IOException
IOExceptionpublic void setVersion(Version version)
setVersion in class StreamInputpublic int available()
throws IOException
available in class StreamInputIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic byte readByte()
throws IOException
StreamInputreadByte in class StreamInputIOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buffer,
int offset,
int length,
boolean fullRead)
throws IOException
IOExceptionpublic void readBytes(byte[] b,
int offset,
int len)
throws IOException
StreamInputreadBytes in class StreamInputb - the array to read bytes intooffset - the offset in the array to start storing byteslen - the number of bytes to readIOExceptionpublic void reset()
throws IOException
StreamInputreset in class StreamInputIOExceptionpublic void close()
throws IOException
StreamInputclose in interface Closeableclose in interface AutoCloseableclose in class StreamInputIOExceptionprotected abstract void doClose()
throws IOException
IOExceptionprotected boolean readyBuffer()
throws IOException
IOExceptionprotected abstract void readHeader(StreamInput in) throws IOException
IOExceptionprotected abstract int uncompress(StreamInput in, byte[] out) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.