Package akka.serialization
Class ByteArraySerializer
- java.lang.Object
- 
- akka.serialization.ByteArraySerializer
 
- 
- All Implemented Interfaces:
- BaseSerializer,- ByteBufferSerializer,- Serializer
 
 public class ByteArraySerializer extends java.lang.Object implements BaseSerializer, ByteBufferSerializer This is a special Serializer that Serializes and deserializes byte arrays only, (just returns the byte array unchanged/uncopied)
- 
- 
Constructor SummaryConstructors Constructor Description ByteArraySerializer(ExtendedActorSystem system)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidakka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1)Globally unique serialization identifier configured in thereference.conf.java.lang.ObjectfromBinary(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.ObjectfromBinary(java.nio.ByteBuffer buf, java.lang.String manifest)Produces an object from aByteBuffer, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.intidentifier()Globally unique serialization identifier configured in thereference.conf.booleanincludeManifest()Returns whether this serializer needs a manifest in the fromBinary methodExtendedActorSystemsystem()Actor system which is required by most serializer implementations.byte[]toBinary(java.lang.Object o)Serializes the given object into an Array of Byte.voidtoBinary(java.lang.Object o, java.nio.ByteBuffer buf)Serializes the given object into theByteBuffer.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface akka.serialization.BaseSerializeridentifierFromConfig, SerializationIdentifiers
 - 
Methods inherited from interface akka.serialization.SerializerfromBinary, fromBinary
 
- 
 
- 
- 
- 
Constructor Detail- 
ByteArraySerializerpublic ByteArraySerializer(ExtendedActorSystem system) 
 
- 
 - 
Method Detail- 
akka$serialization$BaseSerializer$_setter_$identifier_$eqprotected void akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1) Description copied from interface:BaseSerializerGlobally unique serialization identifier configured in thereference.conf.See Serializer.identifier.- Specified by:
- akka$serialization$BaseSerializer$_setter_$identifier_$eqin interface- BaseSerializer
 
 - 
fromBinarypublic java.lang.Object fromBinary(byte[] bytes, scala.Option<java.lang.Class<?>> clazz) throws java.io.NotSerializableExceptionDescription copied from interface:SerializerProduces an object from an array of bytes, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.- Specified by:
- fromBinaryin interface- Serializer
- Throws:
- java.io.NotSerializableException
 
 - 
fromBinarypublic java.lang.Object fromBinary(java.nio.ByteBuffer buf, java.lang.String manifest) throws java.io.NotSerializableExceptionDescription copied from interface:ByteBufferSerializerProduces an object from aByteBuffer, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.- Specified by:
- fromBinaryin interface- ByteBufferSerializer
- Throws:
- java.io.NotSerializableException
 
 - 
identifierpublic int identifier() Description copied from interface:BaseSerializerGlobally unique serialization identifier configured in thereference.conf.See Serializer.identifier.- Specified by:
- identifierin interface- BaseSerializer
- Specified by:
- identifierin interface- Serializer
 
 - 
includeManifestpublic boolean includeManifest() Description copied from interface:SerializerReturns whether this serializer needs a manifest in the fromBinary method- Specified by:
- includeManifestin interface- Serializer
 
 - 
systempublic ExtendedActorSystem system() Description copied from interface:BaseSerializerActor system which is required by most serializer implementations.- Specified by:
- systemin interface- BaseSerializer
 
 - 
toBinarypublic byte[] toBinary(java.lang.Object o) Description copied from interface:SerializerSerializes the given object into an Array of Byte.Note that the array must not be mutated by the serializer after it has been returned. - Specified by:
- toBinaryin interface- Serializer
 
 - 
toBinarypublic void toBinary(java.lang.Object o, java.nio.ByteBuffer buf)Description copied from interface:ByteBufferSerializerSerializes the given object into theByteBuffer.- Specified by:
- toBinaryin interface- ByteBufferSerializer
 
 
- 
 
-