Class ByteBufferUtils


  • public class ByteBufferUtils
    extends Object
    Utility class for ByteBuffers
    • Method Detail

      • 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