public interface Namespace
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE |
static int |
MAX_BUFFER_SIZE |
static Namespace |
NONE
Empty namespace that throws exceptions on serialization.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
deserialize(byte[] bytes)
Deserializes given byte array to Object using Kryo instance in pool.
|
<T> T |
deserialize(ByteBuffer buffer)
Deserializes given byte buffer to Object using Kryo instance in pool.
|
default <T> T |
deserialize(InputStream stream)
Deserializes given InputStream to an Object using Kryo instance in pool.
|
<T> T |
deserialize(InputStream stream,
int bufferSize)
Deserializes given InputStream to an Object using Kryo instance in pool.
|
default byte[] |
serialize(Object obj)
Serializes given object to byte array using Kryo instance in pool.
|
void |
serialize(Object obj,
ByteBuffer buffer)
Serializes given object to byte buffer using Kryo instance in pool.
|
byte[] |
serialize(Object obj,
int bufferSize)
Serializes given object to byte array using Kryo instance in pool.
|
default void |
serialize(Object obj,
OutputStream stream)
Serializes given object to OutputStream using Kryo instance in pool.
|
void |
serialize(Object obj,
OutputStream stream,
int bufferSize)
Serializes given object to OutputStream using Kryo instance in pool.
|
static final Namespace NONE
static final int DEFAULT_BUFFER_SIZE
static final int MAX_BUFFER_SIZE
default byte[] serialize(Object obj)
Note: Serialized bytes must be smaller than MAX_BUFFER_SIZE.
obj - Object to serializebyte[] serialize(Object obj, int bufferSize)
obj - Object to serializebufferSize - maximum size of serialized bytesvoid serialize(Object obj, ByteBuffer buffer)
obj - Object to serializebuffer - to write todefault void serialize(Object obj, OutputStream stream)
obj - Object to serializestream - to write tovoid serialize(Object obj, OutputStream stream, int bufferSize)
obj - Object to serializestream - to write tobufferSize - size of the buffer in front of the stream<T> T deserialize(byte[] bytes)
T - deserialized Object typebytes - serialized bytes<T> T deserialize(ByteBuffer buffer)
T - deserialized Object typebuffer - input with serialized bytesdefault <T> T deserialize(InputStream stream)
T - deserialized Object typestream - input stream<T> T deserialize(InputStream stream, int bufferSize)
T - deserialized Object typestream - input streambufferSize - size of the buffer in front of the streamCopyright © 2013–2019. All rights reserved.