public class FramedSnappyCompressorOutputStream extends CompressorOutputStream
Based on the "spec" in the version "Last revised: 2013-10-25"
Constructor and Description |
---|
FramedSnappyCompressorOutputStream(OutputStream out)
Constructs a new output stream that compresses
snappy-framed-compressed data to the specified output stream.
|
FramedSnappyCompressorOutputStream(OutputStream out,
Parameters params)
Constructs a new output stream that compresses
snappy-framed-compressed data to the specified output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finish()
Compresses all remaining data and writes it to the stream,
doesn't close the underlying stream.
|
void |
write(byte[] data,
int off,
int len) |
void |
write(int b) |
flush, write
public FramedSnappyCompressorOutputStream(OutputStream out) throws IOException
out
- the OutputStream to which to write the compressed dataIOException
- if writing the signature failspublic FramedSnappyCompressorOutputStream(OutputStream out, Parameters params) throws IOException
out
- the OutputStream to which to write the compressed dataparams
- parameters used to fine-tune compression, in
particular to balance compression ratio vs compression speed.IOException
- if writing the signature failspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void finish() throws IOException
IOException
- if an error occurspublic void write(byte[] data, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.