GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add limit support to ReadChannel by BenWhitehead · Pull Request #688 · googleapis/java-core

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

Conversation

@BenWhitehead

@BenWhitehead BenWhitehead commented Jan 25, 2022 •
edited by Neenu1995
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 to absorb the burden and prevent reading more bytes than necessary from GCS.

Related to googleapis/java-storage#1180

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@BenWhitehead
BenWhitehead requested a review from a team January 25, 2022 21:11
@BenWhitehead
feat: Add limit support to ReadChannel
9e25682
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.
@BenWhitehead
BenWhitehead force-pushed the limitable-read-channel branch from 20ec870 to 9e25682 Compare January 25, 2022 21:15
Neenu1995
Neenu1995 approved these changes Jan 26, 2022
View reviewed changes
@BenWhitehead
BenWhitehead merged commit 476109e into main Jan 31, 2022
@BenWhitehead
BenWhitehead deleted the limitable-read-channel branch January 31, 2022 18:00
@release-please release-please Bot mentioned this pull request Jan 31, 2022
chore(main): release 2.5.0 #700
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Feb 3, 2022
@release-please
chore(main): release 2.5.0 (#700)
8cffa1f
🤖 I have created a release *beep* *boop*
---


## [2.5.0](v2.4.0...v2.5.0) (2022-02-02)


### Features

* add limit support to ReadChannel ([#688](#688)) ([476109e](476109e))


### Bug Fixes

* **java:** Initialize AsyncSSLPrivateKeyMethod (a grpc netty class) at run-time ([#702](#702)) ([24146a3](24146a3))


### Dependencies

* update dependency com.google.api:gax-bom to v2.12.0 ([#698](#698)) ([c10aab8](c10aab8))
* update dependency com.google.protobuf:protobuf-bom to v3.19.4 ([#699](#699)) ([5d163f5](5d163f5))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit to googleapis/sdk-platform-java that referenced this pull request Mar 21, 2023
@release-please
chore(main): release 2.5.0 (#700)
b9a2c83
🤖 I have created a release *beep* *boop*
---


## [2.5.0](googleapis/java-core@v2.4.0...v2.5.0) (2022-02-02)


### Features

* add limit support to ReadChannel ([#688](googleapis/java-core#688)) ([9543eb2](googleapis/java-core@9543eb2))


### Bug Fixes

* **java:** Initialize AsyncSSLPrivateKeyMethod (a grpc netty class) at run-time ([#702](googleapis/java-core#702)) ([af1c9b3](googleapis/java-core@af1c9b3))


### Dependencies

* update dependency com.google.api:gax-bom to v2.12.0 ([#698](googleapis/java-core#698)) ([34bbad8](googleapis/java-core@34bbad8))
* update dependency com.google.protobuf:protobuf-bom to v3.19.4 ([#699](googleapis/java-core#699)) ([9e2f077](googleapis/java-core@9e2f077))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@Neenu1995 Neenu1995 Neenu1995 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@BenWhitehead @Neenu1995
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.