public final class SerializationUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BUF_LEN |
Constructor and Description |
---|
SerializationUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
booleanAt(byte[] data,
int pos)
Returns the boolean at the given position in the given byte array.
|
static void |
copyBytes(java.io.DataInput in,
java.io.DataOutput out,
int length,
byte[] buf)
Copies the specified number of bytes from the given DataInput to the given
DataOutput.
|
static int |
intAt(byte[] data,
int pos)
Returns the int that starts at the given position in the given byte array.
|
static long |
longAt(byte[] data,
int pos)
Returns the long that starts at the given position in the given byte array.
|
static void |
setIntAt(byte[] data,
int pos,
int value)
Sets the int that starts at the given position in the given byte array.
|
static void |
setLongAt(byte[] data,
int pos,
long value)
Sets the long that starts at the given position in the given byte array.
|
static int |
unsignedShortAt(byte[] data,
int pos)
Returns the unsigned short that starts at the given position in the given
byte array.
|
public static final int BUF_LEN
public static final boolean booleanAt(byte[] data, int pos)
public static final int unsignedShortAt(byte[] data, int pos)
public static final int intAt(byte[] data, int pos)
public static final void setIntAt(byte[] data, int pos, int value)
public static final long longAt(byte[] data, int pos)
public static final void setLongAt(byte[] data, int pos, long value)
public static final void copyBytes(java.io.DataInput in, java.io.DataOutput out, int length, byte[] buf) throws java.io.IOException
in
- the DataInput to read from.out
- the DataOutput to write to.length
- the number of bytes to copy.buf
- the buffer to use. Must be of length BUF_LEN.java.io.IOException