Package com.fineqt.fpb.lib.api

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


            IListValue<IRecordSetValue> headers = (IListValue<IRecordSetValue>)
                    msgValue.getField(HTTP_MESSAGE__HEADERS);
            IValue contentLengthValue = null;
            if (headers != null) {
                for (int i = 0; i < headers.getLength(); i++) {
                    IRecordSetValue header = headers.getItem(i);
                    if (header == null) {
                        continue;                           
                    }
                    IValue name = header.getField(HTTP_HEADER__NAME);
                    if (name == null) {
                        continue;
                    }
                    if (HeaderNames.CONTENT_LENGTH.equals(name.getText())) {
                        contentLengthValue = header.getField(HTTP_HEADER__VALUE);
                    }
                }
            }
            //根据httpBody/data来更新
            if (contentLengthValue != null) {
View Full Code Here


                @SuppressWarnings("unchecked")
                IListValue<IRecordSetValue> headers =
                    (IListValue<IRecordSetValue>)result.getValue();
                if (headers != null) {
                    for (int i = 0; i < headers.getLength(); i++) {
                        IRecordSetValue header = headers.getItem(i);
                        assert header != null;
                        processHeadersItem(factory, fieldStack, header);
                    }
                }
            }
View Full Code Here

            if (fieldMeta != null && fieldMeta.getFieldID() == HTTP_MESSAGE__TRAILERS) {
                @SuppressWarnings("unchecked")
                Set<String> nameSet = (Set<String>)fieldStack.peekField(
                        StackFields.TRAILER_NAMES);
                assert nameSet != null;
                IRecordSetValue trailer = (IRecordSetValue)itemResult.getValue();
                if (trailer == null) {
                    return ret;
                }
                ICharstringValue name = (ICharstringValue)trailer.getField(HTTP_HEADER__NAME);
                ICharstringValue value = (ICharstringValue)trailer.getField(HTTP_HEADER__VALUE);
                if (name == null || value == null) {
                    return false;
                }
                nameSet.remove(name.getText());
                //仍然有未处理的Trailer才继续List的循环
View Full Code Here

   
    private void fillPseudoHeader(EncodeContext cxt, byte[] pseudoBlock, int icmpPrtlBytes)
    throws EncodeException {
      ByteBuffer byteBuffer = ByteBuffer.wrap(pseudoBlock);
      //取得上层IPV6协议的头部字段
      IRecordSetValue ipv6Header = (IRecordSetValue)cxt.getFieldStackMap().peekField(
          Ipv6TypeEVExtFactory.HEADER_FIELD);
      if (ipv6Header == null) {
        throw new EncodeException(targetTypeMeta,
            MetaException.CODE.FIELD_NOT_FOUND_IN_STACK_ERROR,
            Ipv6TypeEVExtFactory.HEADER_FIELD);
      }
      IOctetstringValue address;
      //Source Address
      address = (IOctetstringValue)ipv6Header.getField(
          Ipv6TypeEVExtFactory.IPV6_HEADER_SOURCE_ADDRESS);
      assert address != null;
      byteBuffer.put(address.getValue());
      //Destination Address
      address = (IOctetstringValue)ipv6Header.getField(
          Ipv6TypeEVExtFactory.IPV6_HEADER_DESTINATION_ADDRESS);
      assert address != null;
      byteBuffer.put(address.getValue());
      //Upper Layer Packet Length
      byteBuffer.putInt(icmpPrtlBytes);
View Full Code Here

        //Segment结束位置
        int curPosition = cxt.getBuffer().position();
        try {
          assert startOffset % FpbConstants.OCTET_BITS == 0;
          assert curPosition % FpbConstants.OCTET_BITS == 0;
          IRecordSetValue ipHeader;
          byte[] pseudoBlock;
          int upperPrtlBytes = (curPosition - startOffset) / FpbConstants.OCTET_BITS;
          //取得IPV4 Header
          ipHeader = (IRecordSetValue)cxt.getFieldStackMap().peekField(
              Ipv4TypeEVExtFactory.HEADER_FIELD);
View Full Code Here

TOP

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

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.