Package org.eclipse.jetty.toolchain.test
Class ByteBufferUtils
- java.lang.Object
-
- org.eclipse.jetty.toolchain.test.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.
-
-
-
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
-
-