|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.io.OutputStream
![]()
![]()
![]()
java.io.FilterOutputStream
![]()
![]()
![]()
java.util.zip.DeflaterOutputStream
, Flushable

, ZipOutputStream

public class DeflaterOutputStream

This class implements an output stream filter for compressing data in the "deflate" compression format. It is also used as the basis for other types of compression filters, such as GZIPOutputStream.
Deflater

| Field Summary | |
|---|---|
protected byte[] |
buf
Output buffer for writing compressed data. |
protected Deflater |
def
Compressor for this stream. |
Fields inherited from class java.io.FilterOutputStream ![]() |
|---|
out |
| Constructor Summary | |
|---|---|
DeflaterOutputStream
Creates a new output stream with a default compressor and buffer size. |
|
DeflaterOutputStream
Creates a new output stream with the specified compressor and a default buffer size. |
|
DeflaterOutputStream
Creates a new output stream with the specified compressor and buffer size. |
|
| Method Summary | |
|---|---|
void |
close
Writes remaining compressed data to the output stream and closes the underlying stream. |
protected void |
deflate
Writes next block of compressed data to the output stream. |
void |
finish
Finishes writing compressed data to the output stream without closing the underlying stream. |
void |
write
Writes an array of bytes to the compressed output stream. |
void |
write
Writes a byte to the compressed output stream. |
Methods inherited from class java.io.FilterOutputStream ![]() |
|---|
flush |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
| Field Detail |
|---|

protected Deflater![]()
![]()
def

protected byte[] buf
| Constructor Detail |
|---|

public DeflaterOutputStream(OutputStream![]()
![]()
out, Deflater
![]()
![]()
def, int size)
out - the output streamdef - the compressor ("deflater")size - the output buffer size
IllegalArgumentException

- if size is <= 0

public DeflaterOutputStream(OutputStream![]()
![]()
out, Deflater
![]()
![]()
def)
out - the output streamdef - the compressor ("deflater")

public DeflaterOutputStream(OutputStream![]()
![]()
out)
out - the output stream| Method Detail |
|---|

public void write(int b)
throws IOException

write

in class FilterOutputStream

b - the byte to be written
IOException

- if an I/O error has occurred

public void write(byte[] b,
int off,
int len)
throws IOException

write

in class FilterOutputStream

b - the data to be writtenoff - the start offset of the datalen - the length of the data
IOException

- if an I/O error has occurredFilterOutputStream.write(int)


public void finish()
throws IOException

IOException

- if an I/O error has occurred

public void close()
throws IOException

close

in interface Closeable

close

in class FilterOutputStream

IOException

- if an I/O error has occurredFilterOutputStream.flush()
,
FilterOutputStream.out


protected void deflate()
throws IOException

IOException

- if an I/O error has occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||