com.hazelcast.nio.serialization
Class ConstantSerializers.TheByteArraySerializer
java.lang.Object
com.hazelcast.nio.serialization.ConstantSerializers.TheByteArraySerializer
- All Implemented Interfaces:
- ByteArraySerializer<byte[]>, Serializer
- Enclosing class:
- ConstantSerializers
public static final class ConstantSerializers.TheByteArraySerializer
- extends Object
- implements ByteArraySerializer<byte[]>
Method Summary |
void |
destroy()
Called when instance is shutting down. |
int |
getTypeId()
|
byte[] |
read(byte[] buffer)
Converts given byte array to object |
byte[] |
write(byte[] object)
Converts given object to byte array |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantSerializers.TheByteArraySerializer
public ConstantSerializers.TheByteArraySerializer()
getTypeId
public int getTypeId()
- Specified by:
getTypeId
in interface Serializer
- Returns:
- typeId of serializer
write
public byte[] write(byte[] object)
throws IOException
- Description copied from interface:
ByteArraySerializer
- Converts given object to byte array
- Specified by:
write
in interface ByteArraySerializer<byte[]>
- Parameters:
object
- that will be serialized
- Returns:
- byte array that object is serialized into
- Throws:
IOException
read
public byte[] read(byte[] buffer)
throws IOException
- Description copied from interface:
ByteArraySerializer
- Converts given byte array to object
- Specified by:
read
in interface ByteArraySerializer<byte[]>
- Parameters:
buffer
- that object will be read from
- Returns:
- deserialized object
- Throws:
IOException
destroy
public void destroy()
- Description copied from interface:
Serializer
- Called when instance is shutting down. It can be used to clear used resources.
- Specified by:
destroy
in interface Serializer
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.