public class ChunkedDeflaterOutputStream
extends java.util.zip.DeflaterOutputStream
ChunkedDeflaterOutputStream
extends a DeflaterOutputStream
than can be restarted. when the stream is restarted the compression
is finished and the internal deflater is reset. this means that the
underlying output stream can consist of several overlaid compressed
chunks. an InflaterInputStream
would signal EOF when the end of
such a chunk is reached although the underlying stream is not finished. use
ChunkedInflaterInputStream
or the RegionFileInputStream
which
can deal with such streams.Constructor and Description |
---|
ChunkedDeflaterOutputStream(java.io.OutputStream out) |
ChunkedDeflaterOutputStream(java.io.OutputStream out,
java.util.zip.Deflater def) |
ChunkedDeflaterOutputStream(java.io.OutputStream out,
java.util.zip.Deflater def,
int size) |
Modifier and Type | Method and Description |
---|---|
long |
restart()
Restarts the compression.
|
void |
setAutoRestart(long len)
Sets the number of written bytes after which the compression should be
restarted.
|
void |
write(byte[] b,
int off,
int len) |
public ChunkedDeflaterOutputStream(java.io.OutputStream out)
public ChunkedDeflaterOutputStream(java.io.OutputStream out, java.util.zip.Deflater def)
public ChunkedDeflaterOutputStream(java.io.OutputStream out, java.util.zip.Deflater def, int size)
public long restart() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.util.zip.DeflaterOutputStream
java.io.IOException
public void setAutoRestart(long len)
len
- the number of bytes"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"