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

Its not working with direct buffers #3

Open
frotsch opened this issue Jul 8, 2021 · 1 comment
Open

Its not working with direct buffers #3

frotsch opened this issue Jul 8, 2021 · 1 comment

Comments

@frotsch
Copy link

frotsch commented Jul 8, 2021

Because direct buffers are not backed by an array

tmp.put(src.array(), 0, bytesToWrite);
fails with an UnsupportedOperationException.

I will submit a PR to fix this if you accept PR's.

@AndrewOrr
Copy link

It looks like you can sidestep this issue by doing a tmp.put(src) instead of converting it to an array.

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

No branches or pull requests

2 participants