public class SnappyInputStream extends InputStream
SnappyOutputStream.| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
in |
static int |
MAX_CHUNK_SIZE |
| Constructor and Description |
|---|
SnappyInputStream(InputStream input)
Create a filter for reading compressed data as a uncompressed stream
|
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 |
|---|---|
int |
available() |
void |
close()
Close the stream
|
protected boolean |
hasNextChunk() |
int |
rawRead(Object array,
int byteOffset,
int byteLength)
Read uncompressed data into the specified array
|
int |
read()
Reads the next byte of uncompressed data from the input stream.
|
int |
read(byte[] b,
int byteOffset,
int byteLength)
Reads up to len bytes of data from the input stream into an array of
bytes.
|
int |
read(double[] d)
Read double array from the stream
|
int |
read(double[] d,
int off,
int len)
Read double array from the stream
|
int |
read(float[] d)
Read float array from the stream
|
int |
read(float[] d,
int off,
int len)
Read float array from the stream
|
int |
read(int[] d)
Read int array from the stream
|
int |
read(int[] d,
int off,
int len)
Read int array from the stream
|
int |
read(long[] d)
Read long array from the stream
|
int |
read(long[] d,
int off,
int len)
Read long array from the stream
|
int |
read(short[] d)
Read short array from the stream
|
int |
read(short[] d,
int off,
int len)
Read short array from the stream
|
protected void |
readFully(byte[] fragment,
int fragmentLength) |
protected void |
readHeader() |
mark, markSupported, read, reset, skippublic static final int MAX_CHUNK_SIZE
protected final InputStream in
public SnappyInputStream(InputStream input) throws IOException
input - IOExceptionpublic SnappyInputStream(InputStream input, int maxChunkSize) throws IOException
input - maxChunkSize - IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionprotected void readHeader()
throws IOException
IOExceptionprotected void readFully(byte[] fragment,
int fragmentLength)
throws IOException
IOExceptionpublic int read(byte[] b,
int byteOffset,
int byteLength)
throws IOException
read in class InputStreamIOExceptionpublic int rawRead(Object array, int byteOffset, int byteLength) throws IOException
array - byteOffset - byteLength - IOExceptionpublic int read(long[] d,
int off,
int len)
throws IOException
d - inputoff - offsetlen - the number of long elements to readIOExceptionpublic int read(long[] d)
throws IOException
d - IOExceptionpublic int read(double[] d,
int off,
int len)
throws IOException
d - inputoff - offsetlen - the number of double elements to readIOExceptionpublic int read(double[] d)
throws IOException
d - IOExceptionpublic int read(int[] d)
throws IOException
d - IOExceptionpublic int read(int[] d,
int off,
int len)
throws IOException
d - inputoff - offsetlen - the number of int elements to readIOExceptionpublic int read(float[] d,
int off,
int len)
throws IOException
d - inputoff - offsetlen - the number of float elements to readIOExceptionpublic int read(float[] d)
throws IOException
d - IOExceptionpublic int read(short[] d,
int off,
int len)
throws IOException
d - inputoff - offsetlen - the number of short elements to readIOExceptionpublic int read(short[] d)
throws IOException
d - IOExceptionprotected boolean hasNextChunk()
throws IOException
IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionCopyright © 2025 xerial.org. All rights reserved.