public class BAUtils extends Object
This class contains some utilities methods to read/write primitively typed values from/to a byte buffer.
| Constructor and Description |
|---|
BAUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(byte[] left,
int leftPos,
byte[] right,
int rightPos,
int max) |
static boolean |
eq(byte[] left,
int leftPos,
byte[] right,
int rightPos,
int size) |
static int |
readInt(byte[] data,
int offset) |
static long |
readLong(byte[] data,
int offset) |
static long |
readUnsignedInt(byte[] data,
int offset) |
static void |
writeInt(int val,
byte[] data,
int offset) |
static void |
writeLong(long v,
byte[] data,
int offset) |
static void |
writeUnsignedInt(long c,
byte[] data,
int offset) |
static void |
writeUnsignedLong(long v,
byte[] data,
int offset) |
public static long readLong(byte[] data,
int offset)
public static void writeLong(long v,
byte[] data,
int offset)
public static void writeUnsignedLong(long v,
byte[] data,
int offset)
public static int readInt(byte[] data,
int offset)
public static long readUnsignedInt(byte[] data,
int offset)
public static void writeInt(int val,
byte[] data,
int offset)
public static void writeUnsignedInt(long c,
byte[] data,
int offset)
public static boolean eq(byte[] left,
int leftPos,
byte[] right,
int rightPos,
int size)
public static int compare(byte[] left,
int leftPos,
byte[] right,
int rightPos,
int max)
Copyright © 2015. All rights reserved.