Package org.elasticsearch.nio.utils
Class ByteBufferUtils
java.lang.Object
org.elasticsearch.nio.utils.ByteBufferUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic longcopyBytes(ByteBuffer[] source, ByteBuffer destination) Copies bytes from the array of byte buffers into the destination buffer.static intcopyBytes(ByteBuffer source, ByteBuffer destination) Copies bytes from source byte buffer into the destination buffer.
-
Method Details
-
copyBytes
Copies bytes from the array of byte buffers into the destination buffer. The number of bytes copied is limited by the bytes available to copy and the space remaining in the destination byte buffer.- Parameters:
source- byte buffers to copy fromdestination- byte buffer to copy to- Returns:
- number of bytes copied
-
copyBytes
Copies bytes from source byte buffer into the destination buffer. The number of bytes copied is limited by the bytes available to copy and the space remaining in the destination byte buffer.- Parameters:
source- byte buffer to copy fromdestination- byte buffer to copy to- Returns:
- number of bytes copied
-