toSource

fun Reader.toSource(chunkSize: Int = DEFAULT_READER_CHUNK_SIZE, autoClose: Boolean = true): TextChunkSource

Adapts this reader to a pull-based TextChunkSource.

Empty reader results are exposed as empty chunks rather than EOF. When autoClose is true, this reader is closed after its first EOF result.

Throws