org.apache.mina.example.tapedeck

## Class CommandDecoder

- java.lang.Object
- - org.apache.mina.filter.codec.textline.TextLineDecoder
  - - org.apache.mina.example.tapedeck.CommandDecoder

- All Implemented Interfaces:
    ProtocolDecoder

      public class CommandDecoder
      extends TextLineDecoder

  MINA `ProtocolDecoder` which decodes bytes into `Command` objects.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandDecoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out)` Decodes binary or protocol-specific content into higher-level message objects.

    - ### Methods inherited from class org.apache.mina.filter.codec.textline.TextLineDecoder

      `dispose, finishDecode, getBufferLength, getMaxLineLength, setBufferLength, setMaxLineLength, writeText`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CommandDecoder

          public CommandDecoder()

  - ### Method Detail

    - #### decode

          public void decode(IoSession session,
                    IoBuffer in,
                    ProtocolDecoderOutput out)
                      throws Exception

      Description copied from class: `TextLineDecoder`
      Decodes binary or protocol-specific content into higher-level message objects. MINA invokes `ProtocolDecoder.decode(IoSession, IoBuffer, ProtocolDecoderOutput)` method with read data, and then the decoder implementation puts decoded messages into `ProtocolDecoderOutput`.
      Specified by:
        `decode` in interface `ProtocolDecoder`
      Overrides:
        `decode` in class `TextLineDecoder`
      Throws:
        `Exception` - if the read data violated protocol specification

Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.