Class ZstdCompressorOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.compress.compressors.CompressorOutputStream<com.github.luben.zstd.ZstdOutputStream>
org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class ZstdCompressorOutputStream
extends CompressorOutputStream<com.github.luben.zstd.ZstdOutputStream>
CompressorOutputStream
implementation to create Zstandard encoded stream. Library relies on Zstandard
JNI- Since:
- 1.16
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorDescriptionZstdCompressorOutputStream
(OutputStream outStream) Wraps the given stream into a zstd-jni ZstdOutputStream using the default values forlevel
,closeFrameOnFlush
anduseChecksum
.ZstdCompressorOutputStream
(OutputStream outStream, int level) Wraps the given stream into a zstd-jni ZstdOutputStream using the default values forcloseFrameOnFlush
anduseChecksum
.ZstdCompressorOutputStream
(OutputStream outStream, int level, boolean closeFrameOnFlush) Wraps the given stream into a zstd-jni ZstdOutputStream using the default value foruseChecksum
.ZstdCompressorOutputStream
(OutputStream outStream, int level, boolean closeFrameOnFlush, boolean useChecksum) Wraps the given stream into a zstd-jni ZstdOutputStream. -
Method Summary
Methods inherited from class org.apache.commons.compress.compressors.CompressorOutputStream
out
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
-
Constructor Details
-
ZstdCompressorOutputStream
Wraps the given stream into a zstd-jni ZstdOutputStream using the default values forlevel
,closeFrameOnFlush
anduseChecksum
.- Parameters:
outStream
- the stream to write to- Throws:
IOException
- if zstd-jni does
-
ZstdCompressorOutputStream
Wraps the given stream into a zstd-jni ZstdOutputStream using the default values forcloseFrameOnFlush
anduseChecksum
.- Parameters:
outStream
- the stream to write tolevel
- value for zstd-jni's level argument- Throws:
IOException
- if zstd-jni does- Since:
- 1.18
-
ZstdCompressorOutputStream
public ZstdCompressorOutputStream(OutputStream outStream, int level, boolean closeFrameOnFlush) throws IOException Wraps the given stream into a zstd-jni ZstdOutputStream using the default value foruseChecksum
.- Parameters:
outStream
- the stream to write tolevel
- value for zstd-jni's level argumentcloseFrameOnFlush
- value for zstd-jni's closeFrameOnFlush argument- Throws:
IOException
- if zstd-jni does- Since:
- 1.18
-
ZstdCompressorOutputStream
public ZstdCompressorOutputStream(OutputStream outStream, int level, boolean closeFrameOnFlush, boolean useChecksum) throws IOException Wraps the given stream into a zstd-jni ZstdOutputStream.- Parameters:
outStream
- the stream to write tolevel
- value for zstd-jni's level argumentcloseFrameOnFlush
- value for zstd-jni's closeFrameOnFlush argumentuseChecksum
- value for zstd-jni's useChecksum argument- Throws:
IOException
- if zstd-jni does- Since:
- 1.18
-
-
Method Details
-
toString
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-