org.littleshoot.util.mina.decode.binary
Class UnsignedIntDecodingState

java.lang.Object
  extended by org.littleshoot.util.mina.decode.binary.UnsignedIntDecodingState
All Implemented Interfaces:
DecodingState

public abstract class UnsignedIntDecodingState
extends Object
implements DecodingState

Decoding state for reading a single unsigned int.


Constructor Summary
UnsignedIntDecodingState()
           
 
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(long decodedShort, org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
          Called on the subclass when the unsigned int has been successfully decoded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnsignedIntDecodingState

public UnsignedIntDecodingState()
Method Detail

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(long decodedShort,
                                              org.littleshoot.mina.filter.codec.ProtocolDecoderOutput out)
                                       throws Exception
Called on the subclass when the unsigned int has been successfully decoded.

Parameters:
decodedShort - The decoded unsigned int.
out - The decoder output.
Returns:
The next state.
Throws:
Exception - If any unexpected error occurs.


Copyright © 2013 LittleShoot. All Rights Reserved.