Package-level declarations

Types

Link copied to clipboard
class KBufferedReader(reader: KReader, bufferSize: Int, context: KnioContext) : KReader

A buffered reader that reads characters from a KReader.

Link copied to clipboard
Link copied to clipboard

A FileInputStream obtains input bytes from a file in a file system.

Link copied to clipboard

A KFileOutputStream is an asynchronous file output stream that supports coroutine-based non-blocking I/O operations.

Link copied to clipboard
abstract class KInputStream(context: KnioContext) : KAutoCloseable

This abstract class is the superclass of all classes representing an input stream of bytes.

Link copied to clipboard

A reader that reads characters from an KInputStream.

Link copied to clipboard
abstract class KOutputStream : KAutoCloseable
Link copied to clipboard
abstract class KReader(context: KnioContext, lock: Mutex = Mutex()) : KAutoCloseable

Abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun KReader.buffered(bufferSize: Int? = null): KBufferedReader
Link copied to clipboard
Link copied to clipboard
suspend fun KInputStream.copyTo(output: OutputStream, bufferSize: Int = DEFAULT_BUFFER_SIZE): Long
suspend fun KInputStream.copyTo(output: KOutputStream, bufferSize: Int = DEFAULT_BUFFER_SIZE): Long

Copies this input stream to the specified output stream.

Link copied to clipboard

Opens a KInputStream for the given File.

Link copied to clipboard

Opens a KOutputStream for the given File.

Link copied to clipboard
suspend fun File.md5(): String

Computes the MD5 hash of the file.

Link copied to clipboard
suspend fun KInputStream.reader(charset: Charset = Charsets.UTF_8): KInputStreamReader
Link copied to clipboard
suspend fun KReader.readText(): String