public class Serialize extends Object
| Constructor and Description |
|---|
Serialize() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
deserializeBoolean(byte[] buffer,
int pos)
Read a boolean from a buffer at a given position
|
static byte[] |
deserializeBytes(byte[] buffer,
int pos)
Read a byte[] from a buffer at a given position
|
static int |
deserializeInt(byte[] buffer,
int pos)
Read an integer from a buffer at a given position
|
static int |
serialize(byte[] value,
byte[] buffer,
int pos)
Write a byte[] into a buffer at a given position
|
static int |
serialize(int value,
byte[] buffer,
int pos)
Write an integer into a buffer at a given position
|
public static final byte TRUE
public static final byte FALSE
public static int serialize(int value,
byte[] buffer,
int pos)
value - The value to serializebuffer - The buffer to store the value intopos - The position where we serialize the integerpublic static int serialize(byte[] value,
byte[] buffer,
int pos)
value - The value to serializebuffer - The buffer to store the value intopos - The position where we serialize the byte[]public static int deserializeInt(byte[] buffer,
int pos)
buffer - The buffer containing the serialized integerpos - The position from which we will read an integerpublic static byte[] deserializeBytes(byte[] buffer,
int pos)
buffer - The buffer containing the serialized byte[]pos - The position from which we will read a byte[]public static boolean deserializeBoolean(byte[] buffer,
int pos)
buffer - The buffer containing the serialized booleanpos - The position from which we will read a booleanCopyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.