net.sf.cindy.decoder
Class ByteArrayDecoder

java.lang.Object
  extended by net.sf.cindy.decoder.ByteArrayDecoder
All Implemented Interfaces:
PacketDecoder

public class ByteArrayDecoder
extends java.lang.Object
implements PacketDecoder

Decode Packet to byte array.

Version:
$id$
Author:
Roger Chen

Constructor Summary
ByteArrayDecoder()
           
 
Method Summary
 java.lang.Object decode(Session session, Packet packet)
          Decode packet to object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayDecoder

public ByteArrayDecoder()
Method Detail

decode

public java.lang.Object decode(Session session,
                               Packet packet)
                        throws java.lang.Exception
Description copied from interface: PacketDecoder
Decode packet to object. The content of the packet is readonly, and it's position will not be changed if the method return null.

Specified by:
decode in interface PacketDecoder
Parameters:
session - session
packet - packet
Returns:
decoded object
Throws:
java.lang.Exception - any exception