public final class SnappyFramedOutputStream extends OutputStream
OutputStream.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BLOCK_SIZE |
static double |
DEFAULT_MIN_COMPRESSION_RATIO |
static int |
MAX_BLOCK_SIZE
We place an additional restriction that the uncompressed data in
a chunk must be no longer than 65536 bytes.
|
| Constructor and Description |
|---|
SnappyFramedOutputStream(OutputStream out)
Creates a Snappy output stream to write data to the specified underlying output stream.
|
SnappyFramedOutputStream(OutputStream out,
boolean writeChecksums,
int blockSize,
double minCompressionRatio) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
static SnappyFramedOutputStream |
newChecksumFreeBenchmarkOutputStream(OutputStream out)
Creates a Snappy output stream with block checksums disabled.
|
void |
write(byte[] input,
int offset,
int length) |
void |
write(int b) |
writepublic static final int MAX_BLOCK_SIZE
public static final int DEFAULT_BLOCK_SIZE
public static final double DEFAULT_MIN_COMPRESSION_RATIO
public SnappyFramedOutputStream(OutputStream out) throws IOException
out - the underlying output streamIOExceptionpublic SnappyFramedOutputStream(OutputStream out, boolean writeChecksums, int blockSize, double minCompressionRatio) throws IOException
IOExceptionpublic static SnappyFramedOutputStream newChecksumFreeBenchmarkOutputStream(OutputStream out) throws IOException
out - the underlying output streamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] input,
int offset,
int length)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2011–2019. All rights reserved.