DecodeParameters paras, DecodeResult result) throws DecodeException {
DecodeResult ret = super.postDecode(cxt, input, paras, result);
if (ret.getValue() != null) {
//设置chunkLength
IContainerValue value = (IContainerValue)ret.getValue();
IValue lenValue = value.getField(HTTP_CHUNK_LENGTH_LINE__CHUNK_LENGTH);
IIntegerValue intValue = (IIntegerValue)cxt.getFieldStackMap().peekField(
StackFields.CHUNK_LENGTH);
if (intValue == null) {
intValue = getPModule().getFactory().createInteger();
cxt.getFieldStackMap().setTopField(StackFields.CHUNK_LENGTH, intValue);
}
try {
intValue.setInteger(Integer.parseInt(lenValue.getText(), 16));
} catch (NumberFormatException e) {
//有错误时认为是0
intValue.setInteger(0);
}
}