Package com.fineqt.fpb.lib.api

Examples of com.fineqt.fpb.lib.api.IIntegerValue


                            //hasBody
                            IBooleanValue hasBody = factory.createBoolean();
                            hasBody.setBoolean(true);
                            fieldStack.setTopField(StackFields.HAS_BODY, hasBody);
                            //contentLength
                            IIntegerValue lenValue = factory.createInteger();
                            lenValue.setInteger(contentLength);
                            fieldStack.setTopField(StackFields.CONTENT_LENGTH, lenValue);
                        }
                    } catch (NumberFormatException e) {
                        //忽略错误长度
                    }
View Full Code Here


            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);
                }
            }
            return ret;
        }
View Full Code Here

          Ipv4TypeEVExtFactory.IPV4_HEADER_DESTINATION_ADDRESS);
      pseudoBuffer.put(oStr.getValue());
      //zero
      pseudoBuffer.position(pseudoBuffer.position() + 1);
      //ipv4 protocol
      IIntegerValue iValue = (IIntegerValue)ipv4Header.getField(
          Ipv4TypeEVExtFactory.IPV4_HEADER_PROTOCOL);
      pseudoBuffer.put((byte)iValue.getInteger());
      //segment length
      pseudoBuffer.putShort((short)upperPrtlBytes);
      //取得UDP数据并填充
      IReadWritableBitBuffer encodeBuffer = cxt.getBuffer();
      encodeBuffer.position(startOffset);
View Full Code Here

TOP

Related Classes of com.fineqt.fpb.lib.api.IIntegerValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.