Class ByteBufferUtils

java.lang.Object
org.eclipse.jetty.toolchain.test.ByteBufferUtils

public class ByteBufferUtils extends Object
  • Constructor Details

    • ByteBufferUtils

      public ByteBufferUtils()
  • Method Details

    • toArray

      public static byte[] toArray(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 String toString(ByteBuffer buffer)
      Convert the ByteBuffer to a UTF-8 String.
      Parameters:
      buffer - the buffer to convert
      Returns:
      the String form of the buffer