Class FramedSnappyCompressorOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.compress.compressors.CompressorOutputStream<OutputStream>
org.apache.commons.compress.compressors.snappy.FramedSnappyCompressorOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
CompressorOutputStream for the framing Snappy format.
Based on the "spec" in the version "Last revised: 2013-10-25"
- Since:
- 1.14
- See Also:
- This class is not thread-safe
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorDescriptionConstructs 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. -
Method Summary
Methods inherited from class org.apache.commons.compress.compressors.CompressorOutputStream
out
Methods inherited from class java.io.FilterOutputStream
flush, write
-
Constructor Details
-
FramedSnappyCompressorOutputStream
Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.- Parameters:
out
- the OutputStream to which to write the compressed data- Throws:
IOException
- if writing the signature fails
-
FramedSnappyCompressorOutputStream
Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.- Parameters:
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.- Throws:
IOException
- if writing the signature fails
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-
finish
Compresses all remaining data and writes it to the stream, doesn't close the underlying stream.- Throws:
IOException
- if an error occurs
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-