Package org.java_websocket.util
Class ByteBufferUtils
- java.lang.Object
-
- org.java_websocket.util.ByteBufferUtils
-
public class ByteBufferUtils extends Object
Utility class for ByteBuffers
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ByteBuffer
getEmptyByteBuffer()
Get a ByteBuffer with zero capacitystatic int
transferByteBuffer(ByteBuffer source, ByteBuffer dest)
Transfer from one ByteBuffer to another ByteBuffer
-
-
-
Method Detail
-
transferByteBuffer
public static int transferByteBuffer(ByteBuffer source, ByteBuffer dest)
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
public static ByteBuffer getEmptyByteBuffer()
Get a ByteBuffer with zero capacity- Returns:
- empty ByteBuffer
-
-