public class DeflateCompressorOutputStream extends CompressorOutputStream
Constructor and Description |
---|
DeflateCompressorOutputStream(java.io.OutputStream outputStream)
Creates a Deflate compressed output stream with the default parameters.
|
DeflateCompressorOutputStream(java.io.OutputStream outputStream,
DeflateParameters parameters)
Creates a Deflate compressed output stream with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finish()
Finishes compression without closing the underlying stream.
|
void |
flush()
Flushes the encoder and calls
outputStream.flush() . |
void |
write(byte[] buf,
int off,
int len) |
void |
write(int b) |
public DeflateCompressorOutputStream(java.io.OutputStream outputStream) throws java.io.IOException
outputStream
- the stream to wrapjava.io.IOException
- on errorpublic DeflateCompressorOutputStream(java.io.OutputStream outputStream, DeflateParameters parameters) throws java.io.IOException
outputStream
- the stream to wrapparameters
- the deflate parameters to applyjava.io.IOException
- on errorpublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
outputStream.flush()
.
All buffered pending data will then be decompressible from
the output stream. Calling this function very often may increase
the compressed file size a lot.flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void finish() throws java.io.IOException
No more data can be written to this stream after finishing.
java.io.IOException
- on errorpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved