Skip to content

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 authored Jul 27, 2022
1 parent 3db84ef commit 942e8cc
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 942e8cc

Please sign in to comment.