thank you reply.

doDecode() implementation is below.

--
public class ACUPacketReqAnalysis extends CumulativeProtocolDecoder
{
        Logger logger = Logger.getLogger( this.getClass() );

        private int     device = Constants.DEVICE_NONE;
        
        protected boolean doDecode(IoSession session, ByteBuffer in,
ProtocolDecoderOutput out) throws Exception {
                int start = in.get( 0 ) & 0xFF;

                if( start == PacketDefineACU.START ) {
                        session.setAttribute( Constants.SESSION_DEVICE, 
Constants.DEVICE_ACU );

                        ACUMessageReq acu_request = new ACUMessageReq( session, 
in, out, start );
                        out.write( acu_request );

                        return true;
                } else {
                        return false;
                }
        }
}


On 9/12/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote:
> It means that your doDecode() implementation returned true but didn't alter
> the position of the ByteBuffer.
>
> see
> http://mina.apache.org/report/1.1/xref/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#136
>
> Could you show us your doDecode() implementation ?
>
> Maarten
>
>
> On 9/12/07, Sungwon Jung <[EMAIL PROTECTED]> wrote:
> >
> > Hello. I'm using MINA 1.1.2.
> >
> > I have a question. what's the mean below message?
> >
> > --
> > EXCEPTION: org.apache.mina.filter.codec.ProtocolDecoderException:
> > java.lang.IllegalStateException: doDecode() can't return true when
> > buffer is not consumed. (Hexdump: empty)
> > --
> >
> > it's minor problem in my program?

Reply via email to