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

Commit

Permalink
docs: update javadocs for ReadChannel#limit to be more clear (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWhitehead committed Jul 27, 2022
1 parent b4c73b6 commit c7de4e2
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit c7de4e2

Please sign in to comment.