public final class SnappyFramedInputStream extends InputStream implements ReadableByteChannel
| Modifier and Type | Class and Description |
|---|---|
static class |
SnappyFramedInputStream.FrameData |
static class |
SnappyFramedInputStream.FrameMetaData |
| Constructor and Description |
|---|
SnappyFramedInputStream(InputStream in)
Creates a Snappy input stream to read data from the specified underlying
input stream.
|
SnappyFramedInputStream(InputStream in,
boolean verifyChecksums)
Creates a Snappy input stream to read data from the specified underlying
input stream.
|
SnappyFramedInputStream(InputStream in,
boolean verifyChecksums,
BufferPool bufferPool)
Creates a Snappy input stream to read data from the specified underlying
input stream.
|
SnappyFramedInputStream(InputStream in,
BufferPool bufferPool)
Creates a Snappy input stream to read data from the specified underlying
input stream.
|
SnappyFramedInputStream(ReadableByteChannel in)
Creates a Snappy input stream to read data from the specified underlying
channel.
|
SnappyFramedInputStream(ReadableByteChannel in,
boolean verifyChecksums)
Creates a Snappy input stream to read data from the specified underlying
channel.
|
SnappyFramedInputStream(ReadableByteChannel in,
boolean verifyChecksums,
BufferPool bufferPool)
Creates a Snappy input stream to read data from the specified underlying
channel.
|
SnappyFramedInputStream(ReadableByteChannel in,
BufferPool bufferPool)
Creates a Snappy input stream to read data from the specified underlying
channel.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
isOpen() |
int |
read() |
int |
read(byte[] output,
int offset,
int length) |
int |
read(ByteBuffer dst) |
long |
transferTo(OutputStream os)
Transfers the entire content of this
InputStream to os. |
long |
transferTo(WritableByteChannel wbc)
Transfers the entire content of this
ReadableByteChannel to
wbc. |
mark, markSupported, read, reset, skippublic SnappyFramedInputStream(InputStream in) throws IOException
Uses DefaultPoolFactory to obtain BufferPool for buffers.
in - the underlying input stream. Must not be null.IOExceptionpublic SnappyFramedInputStream(InputStream in, BufferPool bufferPool) throws IOException
in - the underlying input stream. Must not be null.bufferPool - Used to obtain buffer instances. Must not be null.IOExceptionpublic SnappyFramedInputStream(InputStream in, boolean verifyChecksums) throws IOException
Uses DefaultPoolFactory to obtain BufferPool for buffers.
in - the underlying input stream. Must not be null.verifyChecksums - if true, checksums in input stream will be verifiedIOExceptionpublic SnappyFramedInputStream(InputStream in, boolean verifyChecksums, BufferPool bufferPool) throws IOException
in - the underlying input stream. Must not be null.verifyChecksums - if true, checksums in input stream will be verifiedbufferPool - Used to obtain buffer instances. Must not be null.IOExceptionpublic SnappyFramedInputStream(ReadableByteChannel in, BufferPool bufferPool) throws IOException
in - the underlying readable channel. Must not be null.bufferPool - Used to obtain buffer instances. Must not be null.IOExceptionpublic SnappyFramedInputStream(ReadableByteChannel in) throws IOException
Uses DefaultPoolFactory to obtain BufferPool for buffers.
in - the underlying readable channel. Must not be null.IOExceptionpublic SnappyFramedInputStream(ReadableByteChannel in, boolean verifyChecksums) throws IOException
Uses DefaultPoolFactory to obtain BufferPool for buffers.
in - the underlying readable channel. Must not be null.verifyChecksums - if true, checksums in input stream will be verifiedIOExceptionpublic SnappyFramedInputStream(ReadableByteChannel in, boolean verifyChecksums, BufferPool bufferPool) throws IOException
in - the underlying readable channel. Must not be null.verifyChecksums - if true, checksums in input stream will be verifiedbufferPool - Used to obtain buffer instances. Must not be null.IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] output,
int offset,
int length)
throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelIOExceptionpublic long transferTo(OutputStream os) throws IOException
InputStream to os.
This potentially limits the amount of buffering required to decompress
content.
Unlike read(byte[], int, int), this method does not need to be
called multiple times. A single call will transfer all available content.
Any calls after the source has been exhausted will result in a return
value of 0.
os - The destination to write decompressed content to.IOExceptionpublic long transferTo(WritableByteChannel wbc) throws IOException
ReadableByteChannel to
wbc. This potentially limits the amount of buffering required to
decompress content.
Unlike read(ByteBuffer), this method does not need to be called
multiple times. A single call will transfer all available content. Any
calls after the source has been exhausted will result in a return value
of 0.
wbc - The destination to write decompressed content to.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in class InputStreamIOExceptionCopyright © 2025 xerial.org. All rights reserved.