public final class ByteArraySerializer extends Object implements Serializer
Modifier and Type | Field and Description |
---|---|
static ByteArraySerializer |
INSTANCE
Static instance.
|
Constructor and Description |
---|
ByteArraySerializer() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(byte[] serialized)
Deserialize the content of an object from a byte array.
|
byte[] |
serialize(Object obj)
Serialize the content of an object into a byte array.
|
public static final ByteArraySerializer INSTANCE
public byte[] serialize(Object obj) throws IOException
serialize
in interface Serializer
obj
- Object to serializeIOException
public Object deserialize(byte[] serialized) throws IOException
deserialize
in interface Serializer
serialized
- Byte array representation of the objectIOException
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.