Skip to content

More consistent wording in our documentation #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/common/src/Buffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions core/jvm/src/BuffersJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions core/jvm/src/RawSink.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down