Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overload ByteBufHttpData.toInputStream to avoid coersion to byte array #1918

Closed
codefromthecrypt opened this issue Jul 20, 2019 · 0 comments · Fixed by #1919
Closed

Overload ByteBufHttpData.toInputStream to avoid coersion to byte array #1918

codefromthecrypt opened this issue Jul 20, 2019 · 0 comments · Fixed by #1919
Milestone

Comments

@codefromthecrypt
Copy link
Contributor

ByteBufHttpData.toInputStream could return something like new ByteBufferBackedInputStream(content().nioBuffer()) instead of default which first coerces to a byte array.

trustin pushed a commit that referenced this issue Jul 24, 2019
It's fairly common to convert a `HttpData` to an `InputStream`, e.g. when parsing into Jackson, so it's nice to make sure `ByteBufHttpData.toInputStream` is efficient too.

Fixes #1918
@trustin trustin added this to the 0.89.0 milestone Jul 24, 2019
fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this issue Sep 19, 2020
It's fairly common to convert a `HttpData` to an `InputStream`, e.g. when parsing into Jackson, so it's nice to make sure `ByteBufHttpData.toInputStream` is efficient too.

Fixes line#1918
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants