Class Pack200CompressorOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.compress.CompressFilterOutputStream<OutputStream>
org.apache.commons.compress.compressors.CompressorOutputStream<OutputStream>
org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An output stream that compresses using the Pack200 format.
- Since:
- 1.3
- This class is not thread-safe
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionCompresses the given stream, caching the compressed data in memory.Pack200CompressorOutputStream
(OutputStream out, Map<String, String> props) Compresses the given stream, caching the compressed data in memory and using the given properties.Compresses the given stream using the given strategy to cache the results.Pack200CompressorOutputStream
(OutputStream out, Pack200Strategy mode, Map<String, String> props) Compresses the given stream using the given strategy to cache the results and the given properties. -
Method Summary
Methods inherited from class org.apache.commons.compress.CompressFilterOutputStream
checkOpen, isClosed, isFinished, out, write, write, writeUsAscii, writeUsAsciiRaw, writeUtf8
Methods inherited from class java.io.FilterOutputStream
flush
-
Constructor Details
-
Pack200CompressorOutputStream
Compresses the given stream, caching the compressed data in memory.- Parameters:
out
- the stream to write to- Throws:
IOException
- if writing fails
-
Pack200CompressorOutputStream
Compresses the given stream, caching the compressed data in memory and using the given properties.- Parameters:
out
- the stream to write toprops
- Pack200 properties to use- Throws:
IOException
- if writing fails
-
Pack200CompressorOutputStream
Compresses the given stream using the given strategy to cache the results.- Parameters:
out
- the stream to write tomode
- the strategy to use- Throws:
IOException
- if writing fails
-
Pack200CompressorOutputStream
public Pack200CompressorOutputStream(OutputStream out, Pack200Strategy mode, Map<String, String> props) throws IOExceptionCompresses the given stream using the given strategy to cache the results and the given properties.- Parameters:
out
- the stream to write tomode
- the strategy to useprops
- Pack200 properties to use- Throws:
IOException
- if writing fails
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classCompressFilterOutputStream<OutputStream>
- Throws:
IOException
-
finish
Description copied from class:CompressFilterOutputStream
Finishes the addition of entries to this stream, without closing it. Additional data can be written, if the format supports it.- Overrides:
finish
in classCompressFilterOutputStream<OutputStream>
- Throws:
IOException
- Maybe thrown by subclasses if the user forgets to close the entry.
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-