Class ByteBufferUtils


  • public class ByteBufferUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteBufferUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] toArray​(java.nio.ByteBuffer buffer)
      Get the byte array out of a ByteBuffer.
      static java.lang.String toString​(java.nio.ByteBuffer buffer)
      Convert the ByteBuffer to a UTF-8 String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteBufferUtils

        public ByteBufferUtils()
    • Method Detail

      • toArray

        public static byte[] toArray​(java.nio.ByteBuffer buffer)
        Get the byte array out of a ByteBuffer.
        Parameters:
        buffer - the buffer to get the array from
        Returns:
        the byte buffer array
      • toString

        public static java.lang.String toString​(java.nio.ByteBuffer buffer)
        Convert the ByteBuffer to a UTF-8 String.
        Parameters:
        buffer - the buffer to convert
        Returns:
        the String form of the buffer