org.xerial.snappy
Class SnappyInputStream
java.lang.Object
java.io.InputStream
org.xerial.snappy.SnappyInputStream
- All Implemented Interfaces:
- Closeable
public class SnappyInputStream
- extends InputStream
A stream filter for reading data compressed by SnappyOutputStream.
- Author:
- leo
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected final InputStream in
SnappyInputStream
public SnappyInputStream(InputStream input)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException
readHeader
protected void readHeader()
throws IOException
- Throws:
IOException
readFully
protected void readFully(byte[] fragment,
int fragmentLength)
throws IOException
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
rawRead
public int rawRead(Object array,
int byteOffset,
int byteLength)
throws IOException
- Throws:
IOException
read
public int read(long[] d,
int off,
int len)
throws IOException
- Parameters:
d - inputoff - offsetlen - the number of long elements to read
- Returns:
- written bytes
- Throws:
IOException
read
public int read(long[] d)
throws IOException
- Throws:
IOException
hasNextChunk
protected boolean hasNextChunk()
throws IOException
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
Copyright © 2011. All Rights Reserved.