net.sf.cindy.decoder
Class BufferDecoder

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

public class BufferDecoder
extends java.lang.Object
implements PacketDecoder

Decode Packet to Buffer.

Version:
$id$
Author:
Roger Chen

Constructor Summary
BufferDecoder()
           
 
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

BufferDecoder

public BufferDecoder()
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