org.apache.mina.examples.reverser
Class TextLineDecoder

java.lang.Object
  extended by org.apache.mina.examples.reverser.TextLineDecoder
All Implemented Interfaces:
ProtocolDecoder

public class TextLineDecoder
extends Object
implements ProtocolDecoder

Decodes a text line into a string.

Version:
$Rev: 264677 $, $Date: 2005-08-30 11:44:35 +0900 $,
Author:
Trustin Lee (trustin@apache.org)

Constructor Summary
TextLineDecoder()
           
 
Method Summary
 void decode(ProtocolSession session, ByteBuffer in, ProtocolDecoderOutput out)
          Decodes binary or protocol-specific content into higher-level message objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLineDecoder

public TextLineDecoder()
Method Detail

decode

public void decode(ProtocolSession session,
                   ByteBuffer in,
                   ProtocolDecoderOutput out)
            throws ProtocolViolationException
Description copied from interface: ProtocolDecoder
Decodes binary or protocol-specific content into higher-level message objects. MINA invokes ProtocolDecoder.decode(ProtocolSession, ByteBuffer, ProtocolDecoderOutput) method with read data, and then the decoder implementation puts decoded messages into ProtocolDecoderOutput.

Specified by:
decode in interface ProtocolDecoder
Throws:
ProtocolViolationException - if the read data violated protocol specification


Copyright © 2004-2005 . All Rights Reserved.