Class MultiLineDecoder

  • All Implemented Interfaces:
    org.apache.mina.filter.codec.ProtocolDecoder
    Direct Known Subclasses:
    MultilineHttpStatusResponseDecoder

    public class MultiLineDecoder
    extends org.apache.mina.filter.codec.CumulativeProtocolDecoder

    MultiLineDecoder class.

    Version:
    $Id: $
    Author:
    thedesloge
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String CURRENT_RESPONSE  
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiLineDecoder​(java.nio.charset.Charset charset, java.lang.String multilineIndicator)
      Constructor for MultiLineDecoder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean checkIndicator​(org.apache.mina.core.buffer.IoBuffer in)
      checkIndicator
      protected boolean doDecode​(org.apache.mina.core.session.IoSession session, org.apache.mina.core.buffer.IoBuffer in, org.apache.mina.filter.codec.ProtocolDecoderOutput out)
      java.nio.charset.Charset getCharset()
      getCharset
      java.lang.String getMultilineIndicator()
      getMultilineIndicator
      void setCharset​(java.nio.charset.Charset charset)
      setCharset
      • Methods inherited from class org.apache.mina.filter.codec.CumulativeProtocolDecoder

        decode, dispose, setTransportMetadataFragmentation
      • Methods inherited from class org.apache.mina.filter.codec.ProtocolDecoderAdapter

        finishDecode
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CURRENT_RESPONSE

        protected java.lang.String CURRENT_RESPONSE
    • Constructor Detail

      • MultiLineDecoder

        public MultiLineDecoder​(java.nio.charset.Charset charset,
                                java.lang.String multilineIndicator)

        Constructor for MultiLineDecoder.

        Parameters:
        charset - a Charset object.
        multilineIndicator - a String object.
    • Method Detail

      • doDecode

        protected boolean doDecode​(org.apache.mina.core.session.IoSession session,
                                   org.apache.mina.core.buffer.IoBuffer in,
                                   org.apache.mina.filter.codec.ProtocolDecoderOutput out)
                            throws java.lang.Exception
        Specified by:
        doDecode in class org.apache.mina.filter.codec.CumulativeProtocolDecoder
        Throws:
        java.lang.Exception
      • checkIndicator

        protected boolean checkIndicator​(org.apache.mina.core.buffer.IoBuffer in)
                                  throws java.nio.charset.CharacterCodingException

        checkIndicator

        Parameters:
        in - a IoBuffer object.
        Returns:
        a boolean.
        Throws:
        java.nio.charset.CharacterCodingException - if any.
      • setCharset

        public void setCharset​(java.nio.charset.Charset charset)

        setCharset

        Parameters:
        charset - a Charset object.
      • getCharset

        public java.nio.charset.Charset getCharset()

        getCharset

        Returns:
        a Charset object.
      • getMultilineIndicator

        public java.lang.String getMultilineIndicator()

        getMultilineIndicator

        Returns:
        a String object.