[java-storage] Support `InputStream` as a source of `RequestBody`

Offen
#14,518 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Dhriti07 arbeitet bereits daran.

Seit 29.9.2026.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
java
Bereich
api, backend

Rechercherichtung

Start by locating RequestBody and RewindableContent, then trace the existing ByteBuffer construction and rewind behavior. Verify how InputStream mark/reset support would affect repeated reads; done means callers can construct RequestBody from an InputStream without an intermediate buffer while rewinding remains supported.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

api: storage

Is your feature request related to a problem? Please describe.
Currently RequestBody can only be constructed from ByteBuffer. If a caller wants to supply data from an InputStream this API forces an allocation and copy of the data in the stream into an intermediate buffer.

Describe the solution you'd like
I would like to be able to create RequestBody from an InputStream. It seems that mark and reset functionality can be used to implement rewinding in RewindableContent.

Describe alternatives you've considered
I can use an intermediate buffer solution and it works but it's not ideal.

Vorherrschende Sprache
Java
Sterne
2.1k
Forks
1.2k
Ø Merge
2 T. 14 Std.
Gemergte PRs (30 T.)
192

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus googleapis/google-cloud-java

Alle Issues in googleapis/google-cloud-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.