Class ByteBufferUtils

java.lang.Object
org.java_websocket.util.ByteBufferUtils

public class ByteBufferUtils extends Object
Utility class for ByteBuffers
  • Constructor Details

    • ByteBufferUtils

      private ByteBufferUtils()
      Private constructor for static class
  • Method Details

    • transferByteBuffer

      public static int transferByteBuffer(ByteBuffer source, ByteBuffer dest)
      Transfer from one ByteBuffer to another ByteBuffer
      Parameters:
      source - the ByteBuffer to copy from
      dest - 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