interface ByteSource
source · line 10public
public interface ByteSource
A synchronous byte source supporting short reads. Zero for a positive-size request denotes EOF.
Extensions
public fun ByteSource.readText(): String· scoop:scoop.platform:0.1.0public fun ByteSource.copyTo(destination: ByteSink, bufferSize: Long = 8192L): Long· scoop:scoop.platform:0.1.0public fun ByteSource.readAllBytes(): Array<Byte>· scoop:scoop.platform:0.1.0public fun ByteSource.readFully(buffer: NativeByteBuffer, count: Long = buffer.writableBytes): Unit· scoop:scoop.platform:0.1.0public fun ByteSource.readLineLossy(): String?· scoop:scoop.platform:0.1.0public fun ByteSource.readLine(): String?· scoop:scoop.platform:0.1.0public fun ByteSource.readInto(array: MutableArray<Byte>, offset: Long = 0L, count: Long = array.size - offset): Long· scoop:scoop.platform:0.1.0public fun ByteSource.compressTo(destination: ByteSink, options: CompressionOptions = CompressionOptions.Zstd(ZstdOptions()), bufferSize: Long = 8192L): CompressionTotals· scoop:scoop.compression:0.1.0public fun ByteSource.readTextLossy(): String· scoop:scoop.platform:0.1.0public fun ByteSource.decompressTo(destination: ByteSink, options: DecompressionOptions = DecompressionOptions(), bufferSize: Long = 8192L): CompressionTotals· scoop:scoop.compression:0.1.0public fun ByteSource.readInto(buffer: NativeByteBuffer): Long· scoop:scoop.platform:0.1.0
function readInto
source · line 15public
public fun readInto(buffer: NativeByteBuffer, count: Long): Long
Reads into the selected writable region, returning actual bytes and permitting short reads. Zero for a positive request denotes EOF.
parameter buffer
source · line 15public
buffer: NativeByteBuffer
parameter count
source · line 15public
count: Long