private IcmpV6EchoRequestPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException { this.header = new IcmpV6EchoRequestHeader(rawData, offset, length); int payloadLength = length - header.length(); if (payloadLength > 0) { this.payload = PacketFactories.getFactory(Packet.class, NotApplicable.class) .newInstance(rawData, offset + header.length(), payloadLength, NotApplicable.UNKNOWN); } else { this.payload = null; } }
private IcmpV6EchoRequestPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException { this.header = new IcmpV6EchoRequestHeader(rawData, offset, length); int payloadLength = length - header.length(); if (payloadLength > 0) { this.payload = PacketFactories.getFactory(Packet.class, NotApplicable.class) .newInstance(rawData, offset + header.length(), payloadLength, NotApplicable.UNKNOWN); } else { this.payload = null; } }