public final class ElsaUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ElsaUtil.DataInputToStream
Wraps
DataInput into InputStream |
| Modifier and Type | Method and Description |
|---|---|
static <E> E |
clone(ElsaSerializerPojo serializer,
E data) |
static Class[] |
findClasses(Iterable e)
Serializes content of iterable to find unknown classes.
|
static void |
packInt(DataOutput out,
int value)
Pack int into an output stream.
|
static void |
packIntBigger(DataOutput out,
int value)
Pack int into an output stream.
|
static void |
packLong(DataOutput out,
long value)
Pack long into output.
|
static void |
packLong(OutputStream out,
long value)
Pack long into output.
|
static int |
unpackInt(DataInput is)
Unpack int value from the input stream.
|
static int |
unpackInt(InputStream in)
Unpack int value from the input stream.
|
static long |
unpackLong(DataInput in)
Unpack long value from the input stream.
|
static long |
unpackLong(InputStream in)
Unpack long value from the input stream.
|
public static <E> E clone(ElsaSerializerPojo serializer, E data) throws IOException
IOExceptionpublic static int unpackInt(DataInput is) throws IOException
is - The input stream.IOException - in case of IO errorpublic static long unpackLong(DataInput in) throws IOException
in - The input stream.IOException - in case of IO errorpublic static int unpackInt(InputStream in) throws IOException
in - The input stream.IOException - in case of IO errorpublic static long unpackLong(InputStream in) throws IOException
in - The input stream.IOException - in case of IO errorpublic static void packLong(DataOutput out, long value) throws IOException
out - DataOutput to put value intovalue - to be serialized, must be non-negativeIOException - in case of IO errorpublic static void packLong(OutputStream out, long value) throws IOException
out - OutputStream to put value intovalue - to be serialized, must be non-negativeIOException - in case of IO errorpublic static void packInt(DataOutput out, int value) throws IOException
out - DataOutput to put value intovalue - to be serialized, must be non-negativeIOException - in case of IO errorpublic static void packIntBigger(DataOutput out, int value) throws IOException
packInt(DataOutput, int),
but is optimized for values larger than 127. Usually it is recids.out - String to put value intovalue - to be serialized, must be non-negativeIOException - in case of IO errorpublic static Class[] findClasses(Iterable e)
ElsaMaker.registerClasses(Class[])
}e - Copyright © 2016. All Rights Reserved.