Based on the "spec" in the version "Last revised: 2013-10-25"
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final PureJavaCrc32C | |
| private final ByteUtils. | |
| private int | |
| private static final int | |
| private final byte[] | |
| private final OutputStream | |
| private final Parameters |
| Access | Constructor and Description |
|---|---|
| public | FramedSnappyCompressorOutputStream(final OutputStream
the OutputStream to which to write the compressed data out)Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream. |
| public | FramedSnappyCompressorOutputStream(final OutputStream
the OutputStream to which to write the compressed data out, final Parameters parameters used to fine-tune compression, in particular to balance compression ratio vs compression speed. params)Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public void | finish()
Compresses all remaining data and writes it to the stream, doesn't close the underlying stream. |
| private void | |
| pack-priv static long | |
| public void | write(final byte[]
the data. data, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified byte array
starting at offset off to this output stream.
|
| public void | write(final int
the b)byte.Implements abstract java. |
| private void | |
| private void |
| buffer | back to summary |
|---|---|
| private final byte[] buffer | |
| checksum | back to summary |
|---|---|
| private final PureJavaCrc32C checksum | |
| consumer | back to summary |
|---|---|
| private final ByteUtils. | |
| currentIndex | back to summary |
|---|---|
| private int currentIndex | |
| MAX_COMPRESSED_BUFFER_SIZE | back to summary |
|---|---|
| private static final int MAX_COMPRESSED_BUFFER_SIZE | |
| oneByte | back to summary |
|---|---|
| private final byte[] oneByte | |
| out | back to summary |
|---|---|
| private final OutputStream out | |
| params | back to summary |
|---|---|
| private final Parameters params | |
| FramedSnappyCompressorOutputStream | back to summary |
|---|---|
| public FramedSnappyCompressorOutputStream(final OutputStream out) throws IOException Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.
| |
| FramedSnappyCompressorOutputStream | back to summary |
|---|---|
| public FramedSnappyCompressorOutputStream(final OutputStream out, final Parameters params) throws IOException Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| finish | back to summary |
|---|---|
| public void finish() throws IOException Compresses all remaining data and writes it to the stream, doesn't close the underlying stream.
| |
| flushBuffer | back to summary |
|---|---|
| private void flushBuffer() throws IOException | |
| mask | back to summary |
|---|---|
| pack-priv static long mask(long x) | |
| write | back to summary |
|---|---|
| public void write(final byte[] data, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |
| write | back to summary |
|---|---|
| public void write(final int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| writeCrc | back to summary |
|---|---|
| private void writeCrc() throws IOException | |
| writeLittleEndian | back to summary |
|---|---|
| private void writeLittleEndian(final int numBytes, final long num) throws IOException | |