Feed

abstract inner class Feed : EncoderDecoder.Feed<C> (source)

Encoded data is fed into consume and, as the Decoder.Feed's buffer fills, decoded data is output to the supplied Decoder.OutFeed. This allows for a "lazy" decode, or streaming of decoded data.

Once all data has been fed through consume, call doFinal to process remaining data in the Decoder.Feed buffer. Alternatively, utilize the use extension function (highly recommended) which will call doFinal (or close if there was an error with decoding) for you.

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
override fun close()

Closes the feed rendering it useless.

Link copied to clipboard
fun consume(input: Char)

Updates the Decoder.Feed with a new character to decode.

Link copied to clipboard
protected abstract fun consumeProtected(input: Char)
Link copied to clipboard
override fun flush()

Flushes the buffered input and performs any final decoding operations without closing the Feed.

Link copied to clipboard
override fun isClosed(): Boolean