SnappyOutputStream.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private boolean | |
| private byte[] | |
| protected final InputStream | |
| public static final int | |
| private final int | |
| private byte[] | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | SnappyInputStream(InputStream input)
Create a filter for reading compressed data as a uncompressed stream |
| public | SnappyInputStream(InputStream input, int maxChunkSize)
Create a filter for reading compressed data as a uncompressed stream with provided maximum chunk size |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | |
| protected boolean | |
| private static boolean | |
| public int | |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array byteOffset, int b
at which the data is written.the maximum number of bytes to read. byteLength)Overrides java. Reads up to len bytes of data from the input stream into an array of bytes. |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.input d, int offset off, int the number of long elements to read len)Read long array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.Read long array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.input d, int offset off, int the number of double elements to read len)Read double array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.Read double array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.Read int array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.input d, int offset off, int the number of int elements to read len)Read int array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.input d, int offset off, int the number of float elements to read len)Read float array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.Read float array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.input d, int offset off, int the number of short elements to read len)Read short array from the stream |
| public int | Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.Read short array from the stream |
| public int | read()
Implements abstract java. Reads the next byte of uncompressed data from the input stream. |
| protected void | |
| protected void | |
| private int |
| compressed | back to summary |
|---|---|
| private byte[] compressed | |
| finishedReading | back to summary |
|---|---|
| private boolean finishedReading | |
| header | back to summary |
|---|---|
| private byte[] header | |
| in | back to summary |
|---|---|
| protected final InputStream in | |
| MAX_CHUNK_SIZE | back to summary |
|---|---|
| public static final int MAX_CHUNK_SIZE | |
| maxChunkSize | back to summary |
|---|---|
| private final int maxChunkSize | |
| uncompressed | back to summary |
|---|---|
| private byte[] uncompressed | |
| uncompressedCursor | back to summary |
|---|---|
| private int uncompressedCursor | |
| uncompressedLimit | back to summary |
|---|---|
| private int uncompressedLimit | |
| SnappyInputStream | back to summary |
|---|---|
| public SnappyInputStream(InputStream input) throws IOException Create a filter for reading compressed data as a uncompressed stream | |
| SnappyInputStream | back to summary |
|---|---|
| public SnappyInputStream(InputStream input, int maxChunkSize) throws IOException Create a filter for reading compressed data as a uncompressed stream with provided maximum chunk size | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Close the stream
| |
| hasNextChunk | back to summary |
|---|---|
| protected boolean hasNextChunk() throws IOException | |
| isValidHeader | back to summary |
|---|---|
| private static boolean isValidHeader(byte[] header) throws IOException | |
| rawRead | back to summary |
|---|---|
| public int rawRead(Object array, int byteOffset, int byteLength) throws IOException Read uncompressed data into the specified array
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int byteOffset, int byteLength) throws IOException Overrides java. Reads up to len bytes of data from the input stream into an array of bytes.
| |
| read | back to summary |
|---|---|
| public int read(long[] d, int off, int len) throws IOException Read long array from the stream
| |
| read | back to summary |
|---|---|
| public int read(long[] d) throws IOException Read long array from the stream
| |
| read | back to summary |
|---|---|
| public int read(double[] d, int off, int len) throws IOException Read double array from the stream
| |
| read | back to summary |
|---|---|
| public int read(double[] d) throws IOException Read double array from the stream
| |
| read | back to summary |
|---|---|
| public int read(int[] d) throws IOException Read int array from the stream
| |
| read | back to summary |
|---|---|
| public int read(int[] d, int off, int len) throws IOException Read int array from the stream
| |
| read | back to summary |
|---|---|
| public int read(float[] d, int off, int len) throws IOException Read float array from the stream
| |
| read | back to summary |
|---|---|
| public int read(float[] d) throws IOException Read float array from the stream
| |
| read | back to summary |
|---|---|
| public int read(short[] d, int off, int len) throws IOException Read short array from the stream
| |
| read | back to summary |
|---|---|
| public int read(short[] d) throws IOException Read short array from the stream
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Reads the next byte of uncompressed data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
| |
| readFully | back to summary |
|---|---|
| protected void readFully(byte[] fragment, int fragmentLength) throws IOException | |
| readHeader | back to summary |
|---|---|
| protected void readHeader() throws IOException | |
| readNext | back to summary |
|---|---|
| private int readNext(byte[] dest, int offset, int len) throws IOException Read next len bytes
| |