LineBreakOutFeed

class LineBreakOutFeed(val interval: Byte, val resetOnFlush: Boolean, out: Encoder.OutFeed) : Encoder.OutFeed(source)

A Wrapper around another Encoder.OutFeed to hijack the output and insert new line characters at every expressed interval.

Parameters

interval

The interval at which new lines are output.

resetOnFlush

When true Encoder.Feed.flush will call reset. This setting has no effect if the Encoder.Feed implementation does not pass in their supplied Encoder.OutFeed as a constructor parameter to set Encoder.Feed._out.

out

The other Encoder.OutFeed.

See also

Throws

IllegalArgumentException

If interval is less than 0.

Constructors

Link copied to clipboard
constructor(interval: Byte, resetOnFlush: Boolean, out: Encoder.OutFeed)

Properties

Link copied to clipboard
@get:JvmName(name = "count")
var count: Byte
Link copied to clipboard
@JvmField
val interval: Byte
Link copied to clipboard
@JvmField
val resetOnFlush: Boolean

Functions

Link copied to clipboard
open override fun output(encoded: Char)
Link copied to clipboard
fun reset()

Resets the count to 0.