Package io.github.toolfactory.jvm.util
Class BufferHandler
java.lang.Object
io.github.toolfactory.jvm.util.BufferHandler
public class BufferHandler
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description BufferHandler()
-
Method Summary
Modifier and Type Method Description static java.nio.ByteBuffer
duplicate(java.nio.ByteBuffer buffer)
static <T extends java.nio.Buffer>
Tflip(T buffer)
static <T extends java.nio.Buffer>
intlimit(T buffer)
static <T extends java.nio.Buffer>
intposition(T buffer)
static java.nio.ByteBuffer
shareContent(java.nio.ByteBuffer byteBuffer)
static byte[]
toByteArray(java.nio.ByteBuffer byteBuffer)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BufferHandler
public BufferHandler()
-
-
Method Details
-
flip
public static <T extends java.nio.Buffer> T flip(T buffer) -
position
public static <T extends java.nio.Buffer> int position(T buffer) -
duplicate
public static java.nio.ByteBuffer duplicate(java.nio.ByteBuffer buffer) -
limit
public static <T extends java.nio.Buffer> int limit(T buffer) -
toByteArray
public static byte[] toByteArray(java.nio.ByteBuffer byteBuffer)