public class DeflateCompressorOutputStream extends CompressorOutputStream
Constructor and Description |
---|
DeflateCompressorOutputStream(OutputStream outputStream)
Creates a Deflate compressed output stream with the default parameters.
|
DeflateCompressorOutputStream(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) |
write
public DeflateCompressorOutputStream(OutputStream outputStream) throws IOException
IOException
public DeflateCompressorOutputStream(OutputStream outputStream, DeflateParameters parameters) throws IOException
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] buf, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws 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 Flushable
flush
in class OutputStream
IOException
public void finish() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2014 The Apache Software Foundation. All rights reserved.