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

JAMES-3506 Avoid copies when reading byte buffers #316

Closed
wants to merge 2 commits into from

Conversation

chibenwa
Copy link
Contributor

@chibenwa chibenwa commented Mar 1, 2021

https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#hasArray()

Tells whether or not this buffer is backed by an accessible byte array.

If this method returns true then the array and arrayOffset methods may safely be invoked. 

https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#array()

Returns the byte array that backs this buffer  (optional operation). 

As I understand that you feel concerned I will open a separated PR, But still want this code merged.

@chibenwa chibenwa closed this Mar 2, 2021
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

Successfully merging this pull request may close these issues.

2 participants