public class Serializer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ARRAY_LENGTH
Maximum incoming array length in bytes.
|
static int |
MAX_BITARRAY_SIZE
Maximum bit array size in bits.
|
static java.lang.String |
VERSION |
Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
static int |
length(java.lang.Class<?> type,
int maxStringLength)
Only works for simple messages!!
|
static java.lang.Object |
readFromDataInputStream(java.lang.Class<?> type,
java.io.DataInput dis)
Attempts to read an object of the specified type from the input.
|
static java.util.List<java.lang.Object> |
readListFromDataInputStream(java.lang.Class<?> elementType,
java.io.DataInput dis) |
static void |
writeToDataOutputStream(java.lang.Object object,
java.io.DataOutputStream dos) |
public static final java.lang.String VERSION
public static final int MAX_BITARRAY_SIZE
public static final int MAX_ARRAY_LENGTH
public static java.util.List<java.lang.Object> readListFromDataInputStream(java.lang.Class<?> elementType, java.io.DataInput dis) throws java.io.IOException
java.io.IOException
public static java.lang.Object readFromDataInputStream(java.lang.Class<?> type, java.io.DataInput dis) throws java.io.IOException
type
- type to read.dis
- input to read from.java.io.IOException
- if a read operation result in an IO error or an unexpected value is encountered.public static void writeToDataOutputStream(java.lang.Object object, java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public static int length(java.lang.Class<?> type, int maxStringLength)