Skip to content

Commit

Permalink
Clarify copyTo behavior in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhinkin committed Jun 23, 2023
1 parent 2b7eb60 commit 5171a28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/common/src/Buffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public class Buffer : Source, Sink {

/**
* Copy 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.
* @param startIndex the index (inclusive) of the first byte of data in this buffer to copy,
Expand Down
3 changes: 2 additions & 1 deletion core/jvm/src/BufferExtJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ 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].
* Copy 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.
* @param startIndex the index (inclusive) of the first byte to copy, `0` by default.
Expand Down

0 comments on commit 5171a28

Please sign in to comment.