镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Description

@lkts

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions