FilterOutputStream2

abstract class FilterOutputStream2(delegate: OutputStream) : OutputStream

A FilterOutputStream2 contains another OutputStream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.

Note: unlike FilterOutputStream this class delegates every method by default. This means to transform write calls, you need to override multiple methods. On the other hand, it is less trappy: a simple implementation that just overrides close will not force bytes to be written one-at-a-time.

Constructors

Link copied to clipboard
constructor(delegate: OutputStream)

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun flush()
Link copied to clipboard
open override fun write(b: ByteArray)
open override fun write(b: Int)
open override fun write(b: ByteArray, off: Int, len: Int)