public class ByteArraySerializer extends java.lang.Object implements BaseSerializer, ByteBufferSerializer
| Constructor and Description |
|---|
ByteArraySerializer()
Deprecated.
Use constructor with ExtendedActorSystem. Since 2.4.
|
ByteArraySerializer(ExtendedActorSystem system) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
fromBinary(byte[] bytes,
scala.Option<java.lang.Class<?>> clazz)
Produces an object from an array of bytes, with an optional type-hint;
the class should be loaded using ActorSystem.dynamicAccess.
|
java.lang.Object |
fromBinary(java.nio.ByteBuffer buf,
java.lang.String manifest)
Produces an object from a
ByteBuffer, with an optional type-hint;
the class should be loaded using ActorSystem.dynamicAccess. |
int |
identifier()
Globally unique serialization identifier configured in the
reference.conf. |
boolean |
includeManifest()
Returns whether this serializer needs a manifest in the fromBinary method
|
ExtendedActorSystem |
system()
Actor system which is required by most serializer implementations.
|
byte[] |
toBinary(java.lang.Object o)
Serializes the given object into an Array of Byte
|
void |
toBinary(java.lang.Object o,
java.nio.ByteBuffer buf)
Serializes the given object into the
ByteBuffer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitidentifierFromConfig, SerializationIdentifiersfromBinary, fromBinarypublic ByteArraySerializer(ExtendedActorSystem system)
public ByteArraySerializer()
public ExtendedActorSystem system()
BaseSerializersystem in interface BaseSerializerpublic int identifier()
BaseSerializerreference.conf.
identifier in interface BaseSerializeridentifier in interface Serializerpublic boolean includeManifest()
SerializerincludeManifest in interface Serializerpublic byte[] toBinary(java.lang.Object o)
SerializertoBinary in interface Serializero - (undocumented)public java.lang.Object fromBinary(byte[] bytes,
scala.Option<java.lang.Class<?>> clazz)
SerializerfromBinary in interface Serializerbytes - (undocumented)clazz - (undocumented)public void toBinary(java.lang.Object o,
java.nio.ByteBuffer buf)
ByteBufferSerializerByteBuffer.toBinary in interface ByteBufferSerializero - (undocumented)buf - (undocumented)public java.lang.Object fromBinary(java.nio.ByteBuffer buf,
java.lang.String manifest)
ByteBufferSerializerByteBuffer, with an optional type-hint;
the class should be loaded using ActorSystem.dynamicAccess.fromBinary in interface ByteBufferSerializerbuf - (undocumented)manifest - (undocumented)