Package com.fineqt.fpb.lib.api

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


            //根据httpBody/data来更新
            if (contentLengthValue != null) {
                IContainerValue httpBody = (IContainerValue)msgValue.getField(
                        HTTP_MESSAGE__HTTP_BODY);
                if (httpBody != null && !httpBody.notPresent()) {
                    IOctetstringValue data = (IOctetstringValue)httpBody.getField(
                            HTTP_BODY__DATA);
                    if (data != null) {
                        String text = Integer.toString(data.getLength());
                        contentLengthValue.setText(text);
                    }
                }
            }
        }
View Full Code Here


                IContainerValue chunkData = (IContainerValue)chunkValue.getField(
                        HTTP_CHUNK__CHUNK_DATA);
                //默认为0
                String text = "0";
                if (chunkData != null && !chunkData.notPresent()) {
                    IOctetstringValue data = (IOctetstringValue)chunkData.getField(
                            HTTP_CHUNK_DATA__DATA);
                    if (data != null) {
                        text = Integer.toString(data.getLength());
                    }
                }
                chunkLength.setText(text);
            }
        }
View Full Code Here

      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);
      //3octet zero
      byteBuffer.position(byteBuffer.position() + 3);
      //Next Header
View Full Code Here

        IRecordSetValue ipv4Header, int upperPrtlBytes, int startOffset)
    throws BitBufferException {
      byte[] pseudoBlock = new byte[V4_PSEUDO_HEADER_BYTES + upperPrtlBytes];
      ByteBuffer pseudoBuffer = ByteBuffer.wrap(pseudoBlock);
      //填充虚头部数据
      IOctetstringValue oStr;
      //ipv4 source address
      oStr = (IOctetstringValue)ipv4Header.getField(
          Ipv4TypeEVExtFactory.IPV4_HEADER_SOURCE_ADDRESS);
      pseudoBuffer.put(oStr.getValue());
      //ipv4 destination address
      oStr = (IOctetstringValue)ipv4Header.getField(
          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);
View Full Code Here

    private byte[] createV6PseudoHeader(EncodeContext cxt, IContainerValue udpPrtl,
        IRecordSetValue ipv6Header, int upperPrtlBytes, int startOffset)
    throws BitBufferException {
      byte[] pseudoBlock = new byte[V6_PSEUDO_HEADER_BYTES + upperPrtlBytes];
      ByteBuffer pseudoBuffer = ByteBuffer.wrap(pseudoBlock);
      IOctetstringValue address;
      //Source Address
      address = (IOctetstringValue)ipv6Header.getField(
          Ipv6TypeEVExtFactory.IPV6_HEADER_SOURCE_ADDRESS);
      assert address != null;
      pseudoBuffer.put(address.getValue());
      //Destination Address
      address = (IOctetstringValue)ipv6Header.getField(
          Ipv6TypeEVExtFactory.IPV6_HEADER_DESTINATION_ADDRESS);
      assert address != null;
      pseudoBuffer.put(address.getValue());
      //Upper Layer Packet Length
      pseudoBuffer.putInt(upperPrtlBytes);
      //3octet zero
      pseudoBuffer.position(pseudoBuffer.position() + 3);
      //Next Header
View Full Code Here

TOP

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

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.