FeedBuffer

abstract class FeedBuffer constructor(val blockSize: Int, flush: FeedBuffer.Flush, finalize: FeedBuffer.Finalize)(source)

Helper class for Decoder.Feed and Encoder.Feed to buffer their input until ready to output data via their supplied Decoder.OutFeed/Encoder.OutFeed.

See also

Throws

IllegalArgumentException

if blockSize is less than or equal to 0

Constructors

Link copied to clipboard
constructor(blockSize: Int, flush: FeedBuffer.Flush, finalize: FeedBuffer.Finalize)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
fun interface Finalize

Finalize.invoke will be called whenever finalize is called to process remaining input held in buffer.

Link copied to clipboard
fun interface Flush

Flush.invoke will be called once the buffer fills up, and pass it along to perform bitwise operations on it before outputting results to the supplied Decoder.OutFeed/Encoder.OutFeed.

Properties

Link copied to clipboard
@JvmField
val blockSize: Int
Link copied to clipboard
@get:JvmName(name = "count")
var count: Int

Functions

Link copied to clipboard
fun finalize()

Call whenever Encoder.Feed.doFinalProtected or Decoder.Feed.doFinalProtected is invoked to process the remaining input held in buffer.

Link copied to clipboard
fun update(input: Int)

Update the buffer with new input.