org.littleshoot.util.mina
Class SkippingState
java.lang.Object
org.littleshoot.util.mina.SkippingState
- All Implemented Interfaces:
- DecodingState
- Direct Known Subclasses:
- SpaceSkippingState
public abstract class SkippingState
- extends Object
- implements DecodingState
Skips data until a byte other than the byte to skip is reached. Modified
from AsyncWeb code.
|
Constructor Summary |
SkippingState(byte byteToSkip)
Creates a new skipping state for the specified byte. |
|
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()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SkippingState
public SkippingState(byte byteToSkip)
- Creates a new skipping state for the specified byte.
- Parameters:
byteToSkip - The byte to skip.
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()
throws Exception
- Throws:
Exception
Copyright © 2013 LittleShoot. All Rights Reserved.