synergynetframework.appsystem.services.net.objectmessaging.utility.serializers
Class EnumSerializer

java.lang.Object
  extended by synergynetframework.appsystem.services.net.objectmessaging.utility.serializers.Serializer
      extended by synergynetframework.appsystem.services.net.objectmessaging.utility.serializers.EnumSerializer

public class EnumSerializer
extends Serializer

The Class EnumSerializer.


Constructor Summary
EnumSerializer()
           
 
Method Summary
static java.lang.Enum<?> get(java.nio.ByteBuffer buffer)
          Gets the.
static void put(java.nio.ByteBuffer buffer, java.lang.Enum<?> value)
          Put.
<T> T
readObjectData(ConnectionHandler connectionHandler, java.nio.ByteBuffer buffer, java.lang.Class<T> type, boolean lengthKnown)
          Read object data.
 void writeObjectData(ConnectionHandler connectionHandler, java.nio.ByteBuffer buffer, java.lang.Object object, boolean lengthKnown)
          Write object data.
 
Methods inherited from class synergynetframework.appsystem.services.net.objectmessaging.utility.serializers.Serializer
newInstance, readNull, readObject, readObjectData, setCanBeNull, writeNull, writeObject, writeObjectData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumSerializer

public EnumSerializer()
Method Detail

get

public static java.lang.Enum<?> get(java.nio.ByteBuffer buffer)
                             throws SerializationException
Gets the.

Parameters:
buffer - the buffer
Returns:
the enum
Throws:
SerializationException - the serialization exception

put

public static void put(java.nio.ByteBuffer buffer,
                       java.lang.Enum<?> value)
                throws SerializationException
Put.

Parameters:
buffer - the buffer
value - the value
Throws:
SerializationException - the serialization exception

readObjectData

public <T> T readObjectData(ConnectionHandler connectionHandler,
                            java.nio.ByteBuffer buffer,
                            java.lang.Class<T> type,
                            boolean lengthKnown)
                 throws SerializationException
Description copied from class: Serializer
Read object data.

Specified by:
readObjectData in class Serializer
Type Parameters:
T - the generic type
Parameters:
connectionHandler - the connection handler
buffer - the buffer
type - the type
lengthKnown - the length known
Returns:
the t
Throws:
SerializationException - the serialization exception

writeObjectData

public void writeObjectData(ConnectionHandler connectionHandler,
                            java.nio.ByteBuffer buffer,
                            java.lang.Object object,
                            boolean lengthKnown)
                     throws SerializationException
Description copied from class: Serializer
Write object data.

Specified by:
writeObjectData in class Serializer
Parameters:
connectionHandler - the connection handler
buffer - the buffer
object - the object
lengthKnown - the length known
Throws:
SerializationException - the serialization exception