Skip to content

Commit 942e8cc

Browse files
authored
docs: update javadocs for ReadChannel#limit to be more clear (#880)
Fixes googleapis/java-storage#1512
1 parent 3db84ef commit 942e8cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

java-core/google-cloud-core/src/main/java/com/google/cloud/ReadChannel.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ public interface ReadChannel extends ReadableByteChannel, Closeable, Restorable<
5555
RestorableState<ReadChannel> capture();
5656

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

0 commit comments

Comments
 (0)