Top Description Constructors Methods
org.java_websocket.util

public Class ByteBufferUtils

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer

Utility class for ByteBuffers

Constructor Summary

AccessConstructor and Description
private
ByteBufferUtils()

Private constructor for static class

Method Summary

Modifier and TypeMethod and Description
public static ByteBuffer

Returns:

empty ByteBuffer
getEmptyByteBuffer
()

Get a ByteBuffer with zero capacity

public static int

Returns:

the number of transferred bytes
transferByteBuffer
(ByteBuffer
the ByteBuffer to copy from
source
,
ByteBuffer
the ByteBuffer to copy to
dest
)

Transfer from one ByteBuffer to another ByteBuffer

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ByteBufferUtilsback to summary
private ByteBufferUtils()

Private constructor for static class

Method Detail

getEmptyByteBufferback to summary
public static ByteBuffer getEmptyByteBuffer()

Get a ByteBuffer with zero capacity

Returns:ByteBuffer

empty ByteBuffer

transferByteBufferback to summary
public static int transferByteBuffer(ByteBuffer source, ByteBuffer dest)

Transfer from one ByteBuffer to another ByteBuffer

Parameters
source:ByteBuffer

the ByteBuffer to copy from

dest:ByteBuffer

the ByteBuffer to copy to

Returns:int

the number of transferred bytes