Class ByteBufferUtils


  • public class ByteBufferUtils
    extends java.lang.Object
    Utility Class with Helper functions for working with ByteBuffers
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int transferData​(java.nio.ByteBuffer in, java.nio.ByteBuffer out)
      Transfers as much data as possible from an input ByteBuffer to an output ByteBuffer
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • transferData

        public static int transferData​(java.nio.ByteBuffer in,
                                       java.nio.ByteBuffer out)
        Transfers as much data as possible from an input ByteBuffer to an output ByteBuffer
        Parameters:
        in - The input ByteBuffer
        out - The output ByteBuffer
        Returns:
        The number of bytes transferred