Package org.java_websocket.util
Class ByteBufferUtils
java.lang.Object
org.java_websocket.util.ByteBufferUtils
Utility class for ByteBuffers
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBufferGet a ByteBuffer with zero capacitystatic inttransferByteBuffer(ByteBuffer source, ByteBuffer dest) Transfer from one ByteBuffer to another ByteBuffer
-
Method Details
-
transferByteBuffer
Transfer from one ByteBuffer to another ByteBuffer- Parameters:
source- the ByteBuffer to copy fromdest- the ByteBuffer to copy to- Returns:
- the number of transferred bytes
-
getEmptyByteBuffer
Get a ByteBuffer with zero capacity- Returns:
- empty ByteBuffer
-