Stream

class Stream(val fileName: String? = null, open: () -> InputStream) : TemplateSource.Content

Content read lazily from a caller-supplied InputStream, opened once and cached.

Constructors

Link copied to clipboard
constructor(fileName: String? = null, open: () -> InputStream)

Properties

Link copied to clipboard
open override val fileName: String?

File name sent with the upload, when known.

Functions

Link copied to clipboard
open suspend override fun bytes(): ByteArray

Reads the content. Implementations read once and cache the result.

Link copied to clipboard
open suspend fun sha256(): TemplateId

Legacy template id: SHA-256 of the content, hex encoded.

Link copied to clipboard
open override fun toString(): String