public class SnappyInputStream
extends java.io.InputStream
SnappyOutputStream.| Modifier and Type | Field and Description |
|---|---|
protected java.io.InputStream |
in |
| Constructor and Description |
|---|
SnappyInputStream(java.io.InputStream input)
Create a filter for reading compressed data as a uncompressed stream
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close()
Close the stream
|
protected boolean |
hasNextChunk() |
int |
rawRead(java.lang.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() |
public SnappyInputStream(java.io.InputStream input)
throws java.io.IOException
input - java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionprotected void readHeader()
throws java.io.IOException
java.io.IOExceptionprotected void readFully(byte[] fragment,
int fragmentLength)
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b,
int byteOffset,
int byteLength)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int rawRead(java.lang.Object array,
int byteOffset,
int byteLength)
throws java.io.IOException
array - byteOffset - byteLength - java.io.IOExceptionpublic int read(long[] d,
int off,
int len)
throws java.io.IOException
d - inputoff - offsetlen - the number of long elements to readjava.io.IOExceptionpublic int read(long[] d)
throws java.io.IOException
d - java.io.IOExceptionpublic int read(double[] d,
int off,
int len)
throws java.io.IOException
d - inputoff - offsetlen - the number of double elements to readjava.io.IOExceptionpublic int read(double[] d)
throws java.io.IOException
d - java.io.IOExceptionpublic int read(int[] d)
throws java.io.IOException
d - java.io.IOExceptionpublic int read(int[] d,
int off,
int len)
throws java.io.IOException
d - inputoff - offsetlen - the number of int elements to readjava.io.IOExceptionpublic int read(float[] d,
int off,
int len)
throws java.io.IOException
d - inputoff - offsetlen - the number of float elements to readjava.io.IOExceptionpublic int read(float[] d)
throws java.io.IOException
d - java.io.IOExceptionpublic int read(short[] d,
int off,
int len)
throws java.io.IOException
d - inputoff - offsetlen - the number of short elements to readjava.io.IOExceptionpublic int read(short[] d)
throws java.io.IOException
d - java.io.IOExceptionprotected boolean hasNextChunk()
throws java.io.IOException
java.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException