Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

docs: update javadocs for ReadChannel#limit to be more clear #880

Merged
merged 1 commit into from
Jul 27, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ public interface ReadChannel extends ReadableByteChannel, Closeable, Restorable<
RestorableState<ReadChannel> capture();

/**
* Limit the maximum number of bytes available to be read from this channel. If the limit is
* Limit the maximum number of bytes to be read from the objects content, counting from the
* beginning of the object, which will be available to read from this channel. If the limit is
* larger than the actual size of the content this will have no material impact.
*
* <p>If used in conjunction with {@link #seek(long)} the total number of returned bytes from this
* channel will be reduced by the number of bytes specified to seek.
*
* <p><i>NOTE:</i>Implementers are not required to return a new instance from this method, however
* they are allowed to. Users of this method should always use the instance returned from this
* method.
Expand Down