iitb.con.ds
Class TypeSerializer

java.lang.Object
  extended by iitb.con.ds.TypeSerializer
All Implemented Interfaces:
ItemSerializer<Type>

public class TypeSerializer
extends java.lang.Object
implements ItemSerializer<Type>

TypeSerializer serializes Type to bytes and vice versa

See Also:
Type

Constructor Summary
TypeSerializer()
           
 
Method Summary
 java.lang.Object attributeDeSerialize(java.nio.ByteBuffer buf, java.lang.Object name)
          Deserializes the specified attribute to object value
 Type deSerialize(java.nio.ByteBuffer buf)
          Deserializes the given bytes as Type
 java.nio.ByteBuffer serialize(Type type)
          Serializes Type to bytes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeSerializer

public TypeSerializer()
Method Detail

attributeDeSerialize

public java.lang.Object attributeDeSerialize(java.nio.ByteBuffer buf,
                                             java.lang.Object name)
Deserializes the specified attribute to object value

Specified by:
attributeDeSerialize in interface ItemSerializer<Type>
Parameters:
buf - bytes as ByteBuffer
name - attribute name
Returns:
deserialized attribute value as Object

deSerialize

public Type deSerialize(java.nio.ByteBuffer buf)
Deserializes the given bytes as Type

Specified by:
deSerialize in interface ItemSerializer<Type>
Parameters:
buf - bytes as ByteBuffer
Returns:
deserialized bytes as Type

serialize

public java.nio.ByteBuffer serialize(Type type)
Serializes Type to bytes

Specified by:
serialize in interface ItemSerializer<Type>
Parameters:
type - Type
Returns:
serialized Type as ByteBuffer