ByteArrayRtfSource

An RtfSource backed by an in-memory byte array. This is the dependency-free default source; streaming sources live in the optional rtf-io-* adapter modules.

Constructors

Link copied to clipboard
constructor(data: ByteArray)

Functions

Link copied to clipboard
open override fun read(): Int

Read a single byte as an unsigned value 0..255, or -1 at end of input.

open override fun read(dest: ByteArray): Int

Read bytes into dest. Implementations must read repeatedly if necessary to fill dest, returning a count smaller than dest.size only at end of input — the \binN reader treats a short count as a truncated document.

Link copied to clipboard
open override fun unread(c: Int)

Push back a single byte so it will be returned again by the next read.