diff --git a/core/common/src/Buffer.kt b/core/common/src/Buffer.kt index 0dcc7d5b..c011255e 100644 --- a/core/common/src/Buffer.kt +++ b/core/common/src/Buffer.kt @@ -69,6 +69,7 @@ public class Buffer : Source, Sink { */ @InternalIoApi override val buffer: Buffer get() = this + override fun exhausted(): Boolean = size == 0L override fun require(byteCount: Long) { @@ -179,7 +180,7 @@ public class Buffer : Source, Sink { override fun flush(): Unit = Unit /** - * Copy bytes from this buffer's subrange starting at [startIndex] and ending at [endIndex], to [out] buffer. + * Copies bytes from this buffer's subrange starting at [startIndex] and ending at [endIndex], to [out] buffer. * This method does not consume data from the buffer. * * @param out the destination buffer to copy data into. diff --git a/core/jvm/src/BuffersJvm.kt b/core/jvm/src/BuffersJvm.kt index 6b488a53..4b1364a7 100644 --- a/core/jvm/src/BuffersJvm.kt +++ b/core/jvm/src/BuffersJvm.kt @@ -30,7 +30,7 @@ import java.nio.ByteBuffer import java.nio.channels.ByteChannel /** - * Read and exhaust bytes from [input] into this buffer. Stops reading data on [input] exhaustion. + * Reads and exhausts bytes from [input] into this buffer. Stops reading data on [input] exhaustion. * * @param input the stream to read data from. * @@ -42,7 +42,7 @@ public fun Buffer.transferFrom(input: InputStream): Buffer { } /** - * Read [byteCount] bytes from [input] into this buffer. Throws an exception when [input] is + * Reads [byteCount] bytes from [input] into this buffer. Throws an exception when [input] is * exhausted before reading [byteCount] bytes. * * @param input the stream to read data from. @@ -107,7 +107,7 @@ public fun Buffer.readTo(out: OutputStream, byteCount: Long = size) { } /** - * Copy bytes from this buffer's subrange, starting at [startIndex] and ending at [endIndex], to [out]. This method + * Copies bytes from this buffer's subrange, starting at [startIndex] and ending at [endIndex], to [out]. This method * does not consume data from the buffer. * * @param out the destination to copy data into. diff --git a/core/jvm/src/RawSink.kt b/core/jvm/src/RawSink.kt index 59b15b51..326a2e28 100644 --- a/core/jvm/src/RawSink.kt +++ b/core/jvm/src/RawSink.kt @@ -21,6 +21,7 @@ package kotlinx.io import java.io.Flushable + public actual interface RawSink : AutoCloseable, Flushable { public actual fun write(source: Buffer, byteCount: Long)