public class ByteBufferUtil extends Object
Constructor and Description |
---|
ByteBufferUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
bytesToHex(ByteBuffer bytes) |
static int |
compare(ByteBuffer b1,
ByteBuffer b2)
Compares two
ByteBuffer s according to their byte order (and not the byte value). |
static boolean |
isSmallerOrEqualThan(ByteBuffer a,
ByteBuffer b)
Compares two
ByteBuffer s and checks whether the first ByteBuffer is smaller than or equal to the second. |
static boolean |
isSmallerThan(ByteBuffer a,
ByteBuffer b)
Compares two
ByteBuffer s and checks whether the first ByteBuffer is smaller than the second. |
static ByteBuffer |
oneByteBuffer(int len) |
static String |
toString(ByteBuffer b,
String separator) |
static ByteBuffer |
zeroByteBuffer(int len) |
public static ByteBuffer zeroByteBuffer(int len)
public static ByteBuffer oneByteBuffer(int len)
public static boolean isSmallerThan(ByteBuffer a, ByteBuffer b)
ByteBuffer
s and checks whether the first ByteBuffer is smaller than the second.a
- First ByteBufferb
- Second ByteBufferpublic static boolean isSmallerOrEqualThan(ByteBuffer a, ByteBuffer b)
ByteBuffer
s and checks whether the first ByteBuffer is smaller than or equal to the second.a
- First ByteBufferb
- Second ByteBufferpublic static int compare(ByteBuffer b1, ByteBuffer b2)
ByteBuffer
s according to their byte order (and not the byte value).
b1
- First ByteBufferb2
- Second ByteBufferpublic static String bytesToHex(ByteBuffer bytes)
public static String toString(ByteBuffer b, String separator)
Copyright © 2012–2024. All rights reserved.