org.littleshoot.util.mina
Class CrlfDecodingState
java.lang.Object
org.littleshoot.util.mina.CrlfDecodingState
- All Implemented Interfaces:
- DecodingState
public abstract class CrlfDecodingState
- extends Object
- implements DecodingState
Decodes a single CRLF.
If it is found, the bytes are consumed and Boolean.TRUE
is provided as the product. Otherwise, read bytes are pushed back
to the stream, and Boolean.FALSE is provided as the
product.
Note that if we find a CR but do not find a following LF, we raise
an error.
- Version:
- $Rev$, $Date$
- Author:
- irvingd, trustin
|
Method Summary |
DecodingState |
decode(org.littleshoot.mina.common.ByteBuffer in,
org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
Decodes the input for this state. |
protected abstract DecodingState |
finishDecode(boolean foundCRLF,
org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrlfDecodingState
public CrlfDecodingState()
decode
public DecodingState decode(org.littleshoot.mina.common.ByteBuffer in,
org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
throws Exception
- Description copied from interface:
DecodingState
- Decodes the input for this state.
- Specified by:
decode in interface DecodingState
- Parameters:
in - The read data.out - The output to write to.
- Returns:
- The next decoding state.
- Throws:
Exception - If any error occurs.
finishDecode
protected abstract DecodingState finishDecode(boolean foundCRLF,
org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
throws Exception
- Throws:
Exception
Copyright © 2013 LittleShoot. All Rights Reserved.