iitb.con.util
Class Serializer

java.lang.Object
  extended by iitb.con.util.Serializer

public class Serializer
extends java.lang.Object

Serializer util to converts the wrapper class primitive object types to bytes and vice-versa.


Constructor Summary
Serializer()
           
 
Method Summary
static void toBytes(java.nio.ByteBuffer buf, java.lang.Object value)
          Converts the given primitive object type to bytes
static java.lang.Object toObject(java.nio.ByteBuffer buf, java.lang.Object value)
          Converts the given bytes to primitive object type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializer

public Serializer()
Method Detail

toBytes

public static void toBytes(java.nio.ByteBuffer buf,
                           java.lang.Object value)
Converts the given primitive object type to bytes

Parameters:
buf - ByteBuffer where the converted bytes are placed
value - primitive object type

toObject

public static java.lang.Object toObject(java.nio.ByteBuffer buf,
                                        java.lang.Object value)
Converts the given bytes to primitive object type

Parameters:
buf - ByteBuffer where the bytes are placed
value - primitive object type
Returns:
primitive object type