InflaterOutputStream
open class InflaterOutputStream : FilterOutputStream
| kotlin.Any | |||
| ↳ | java.io.OutputStream | ||
| ↳ | java.io.FilterOutputStream | ||
| ↳ | java.util.zip.InflaterOutputStream | ||
Implements an output stream filter for uncompressing data stored in the "deflate" compression format.
Summary
| Public constructors | |
|---|---|
| InflaterOutputStream(out: OutputStream!)Creates a new output stream with a default decompressor and buffer size. | |
| InflaterOutputStream(out: OutputStream!, infl: Inflater!)Creates a new output stream with the specified decompressor and a default buffer size. | |
| InflaterOutputStream(out: OutputStream!, infl: Inflater!, bufLen: Int)Creates a new output stream with the specified decompressor and buffer size. | |
| Public methods | |
|---|---|
| open Unit | close()Writes any remaining uncompressed data to the output stream and closes the underlying output stream. | 
| open Unit | finish()Finishes writing uncompressed data to the output stream without closing the underlying stream. | 
| open Unit | flush()Flushes this output stream, forcing any pending buffered output bytes to be written. | 
| open Unit | Writes an array of bytes to the uncompressed output stream. | 
| open Unit | Writes a byte to the uncompressed output stream. | 
| Inherited functions | |
|---|---|
| Properties | |
|---|---|
| ByteArray! | Output buffer for writing uncompressed data. | 
| Inflater! | Decompressor for this stream. | 
| Inherited properties | |
|---|---|
Public constructors
InflaterOutputStream
InflaterOutputStream(out: OutputStream!)
Creates a new output stream with a default decompressor and buffer size.
| Parameters | |
|---|---|
| out | OutputStream!: output stream to write the uncompressed data to | 
| Exceptions | |
|---|---|
| java.lang.NullPointerException | if outis null | 
InflaterOutputStream
InflaterOutputStream(
out: OutputStream!,
infl: Inflater!)
Creates a new output stream with the specified decompressor and a default buffer size.
| Parameters | |
|---|---|
| out | OutputStream!: output stream to write the uncompressed data to | 
| infl | Inflater!: decompressor ("inflater") for this stream | 
| Exceptions | |
|---|---|
| java.lang.NullPointerException | if outorinflis null | 
InflaterOutputStream
InflaterOutputStream(
out: OutputStream!,
infl: Inflater!,
bufLen: Int)
Creates a new output stream with the specified decompressor and buffer size.
| Parameters | |
|---|---|
| out | OutputStream!: output stream to write the uncompressed data to | 
| infl | Inflater!: decompressor ("inflater") for this stream | 
| bufLen | Int: decompression buffer size | 
| Exceptions | |
|---|---|
| java.lang.IllegalArgumentException | if bufLen <= 0 | 
| java.lang.NullPointerException | if outorinflis null | 
Public methods
close
open fun close(): Unit
Writes any remaining uncompressed data to the output stream and closes the underlying output stream.
| Exceptions | |
|---|---|
| java.lang.Exception | if this resource cannot be closed | 
| java.io.IOException | if an I/O error occurs | 
finish
open fun finish(): Unit
Finishes writing uncompressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.
| Exceptions | |
|---|---|
| java.io.IOException | if an I/O error occurs or this stream is already closed | 
flush
open fun flush(): Unit
Flushes this output stream, forcing any pending buffered output bytes to be written.
| Exceptions | |
|---|---|
| java.io.IOException | if an I/O error occurs or this stream is already closed | 
write
open fun write(
b: ByteArray!,
off: Int,
len: Int
): Unit
Writes an array of bytes to the uncompressed output stream.
| Parameters | |
|---|---|
| b | ByteArray!: buffer containing compressed data to decompress and write to the output stream | 
| off | Int: starting offset of the compressed data within b | 
| len | Int: number of bytes to decompress from b | 
| Exceptions | |
|---|---|
| java.io.IOException | if an I/O error occurs or this stream is already closed | 
| java.lang.IndexOutOfBoundsException | if off < 0, or iflen < 0, or iflen > b.length - off | 
| java.lang.NullPointerException | if bis null | 
| java.util.zip.ZipException | if a compression (ZIP) format error occurs | 
write
open fun write(b: Int): Unit
Writes a byte to the uncompressed output stream.
| Parameters | |
|---|---|
| b | Int: a single byte of compressed data to decompress and write to the output stream | 
| Exceptions | |
|---|---|
| java.io.IOException | if an I/O error occurs or this stream is already closed | 
| java.util.zip.ZipException | if a compression (ZIP) format error occurs | 
