This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add limit support to ReadChannel
Add new methods to ReadChannel to allow limiting of the channel independent of any chunk sizes or buffers. ###### Motivation GCS supports range reads of objects, ReadChannel currently has `seek` to allow settings the begin offset, but doesn't provide limit to all seeing the end offset. The only alternative is to provide manually sized ByteBuffer(s) to read into that would have to track size externally. This new feature allows the Channel itself ot absorb the burden and prevent reading more bytes than necessary from GCS.
- Loading branch information
1 parent
eb3aba2
commit 9e25682
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- see https://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html --> | ||
<differences> | ||
<!-- Clear doesn't know about default interface methods --> | ||
<difference> | ||
<differenceType>7012</differenceType> | ||
<className>com/google/cloud/ReadChannel</className> | ||
<method>* limit(long)</method> | ||
</difference> | ||
<difference> | ||
<differenceType>7012</differenceType> | ||
<className>com/google/cloud/ReadChannel</className> | ||
<method>long limit()</method> | ||
</difference> | ||
</differences> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters