public class ChunkedDeflaterOutputStream extends 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(OutputStream out) |
ChunkedDeflaterOutputStream(OutputStream out,
Deflater def) |
ChunkedDeflaterOutputStream(OutputStream out,
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) |
close, finish, flush, write
write
public ChunkedDeflaterOutputStream(OutputStream out)
public ChunkedDeflaterOutputStream(OutputStream out, Deflater def)
public ChunkedDeflaterOutputStream(OutputStream out, Deflater def, int size)
public long restart() throws IOException
IOException
- if an I/O error occurspublic void write(byte[] b, int off, int len) throws IOException
write
in class DeflaterOutputStream
IOException
public void setAutoRestart(long len)
len
- the number of bytes"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"