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

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

public class IntSerializer
extends Serializer

The Class IntSerializer.


Constructor Summary
IntSerializer()
          Instantiates a new int serializer.
IntSerializer(java.lang.Boolean optimizePositive)
          Instantiates a new int serializer.
 
Method Summary
static boolean canRead(java.nio.ByteBuffer buffer, boolean optimizePositive)
          Can read.
static int get(java.nio.ByteBuffer buffer, boolean optimizePositive)
          Gets the.
static int put(java.nio.ByteBuffer buffer, int value, boolean optimizePositive)
          Put.
 java.lang.Integer readObjectData(ConnectionHandler connectionHandler, java.nio.ByteBuffer buffer, java.lang.Class 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

IntSerializer

public IntSerializer()
Instantiates a new int serializer.


IntSerializer

public IntSerializer(java.lang.Boolean optimizePositive)
Instantiates a new int serializer.

Parameters:
optimizePositive - the optimize positive
Method Detail

canRead

public static boolean canRead(java.nio.ByteBuffer buffer,
                              boolean optimizePositive)
Can read.

Parameters:
buffer - the buffer
optimizePositive - the optimize positive
Returns:
true, if successful

get

public static int get(java.nio.ByteBuffer buffer,
                      boolean optimizePositive)
Gets the.

Parameters:
buffer - the buffer
optimizePositive - the optimize positive
Returns:
the int

put

public static int put(java.nio.ByteBuffer buffer,
                      int value,
                      boolean optimizePositive)
Put.

Parameters:
buffer - the buffer
value - the value
optimizePositive - the optimize positive
Returns:
the int

readObjectData

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

Specified by:
readObjectData in class Serializer
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