KInputStreamReader

A reader that reads characters from an KInputStream.

This class is equivalent to the java.io.InputStreamReader.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The name of the character encoding being used by this stream.

Functions

Link copied to clipboard
suspend fun KReader.buffered(bufferSize: Int? = null): KBufferedReader
Link copied to clipboard
open suspend override fun close()

Closes this reader and releases any system resources associated with it.

Link copied to clipboard
open suspend fun mark(readLimit: Int)

Marks the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.

Link copied to clipboard
open suspend fun markSupported(): Boolean

Tells whether this stream supports the mark() operation. The default implementation always returns false.

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

Reads characters into the given CharBuffer.

open suspend fun read(): Int

Reads a single character.

open suspend fun read(b: CharArray): Int

Reads characters into an array.

open suspend fun read(b: CharArray, off: Int, len: Int): Int

Reads characters into a portion of an array.

Link copied to clipboard
suspend fun KReader.readText(): String
Link copied to clipboard
open suspend fun ready(): Boolean
Link copied to clipboard
open suspend fun reset()
Link copied to clipboard
open suspend fun skip(n: Long): Long

Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned.