Interface PacketFactory<T,N extends NamedNumber<?,?>>

Type Parameters:
T - target
N - number
All Known Implementing Classes:
AbstractStaticPacketFactory, PropertiesBasedDnsRDataFactory, PropertiesBasedIpV4InternetTimestampOptionDataFactory, PropertiesBasedIpV4OptionFactory, PropertiesBasedIpV4TosFactory, PropertiesBasedIpV6FlowLabelFactory, PropertiesBasedIpV6NeighborDiscoveryOptionFactory, PropertiesBasedIpV6OptionFactory, PropertiesBasedIpV6RoutingDataFactory, PropertiesBasedIpV6TrafficClassFactory, PropertiesBasedPacketFactory, PropertiesBasedRadiotapDataFactory, PropertiesBasedSctpChunkFactory, PropertiesBasedTcpOptionFactory, StaticDataLinkTypePacketFactory, StaticDnsRDataFactory, StaticDot11FrameTypePacketFactory, StaticEtherTypePacketFactory, StaticIcmpV4TypePacketFactory, StaticIcmpV6TypePacketFactory, StaticIpNumberPacketFactory, StaticIpV4InternetTimestampOptionDataFactory, StaticIpV4OptionFactory, StaticIpV4TosFactory, StaticIpV6FlowLabelFactory, StaticIpV6NeighborDiscoveryOptionFactory, StaticIpV6OptionFactory, StaticIpV6RoutingDataFactory, StaticIpV6TrafficClassFactory, StaticLlcNumberPacketFactory, StaticNotApplicablePacketFactory, StaticPppDllProtocolPacketFactory, StaticProtocolFamilyPacketFactory, StaticRadiotapDataFieldFactory, StaticSctpChunkFactory, StaticSctpPortPacketFactory, StaticSsh2MessageNumberPacketFactory, StaticTcpOptionFactory, StaticTcpPortPacketFactory, StaticUdpPortPacketFactory, StaticUnknownPacketFactory

public interface PacketFactory<T,N extends NamedNumber<?,?>>
Since:
pcap4j 0.9.11
  • Method Details

    • newInstance

      T newInstance(byte[] rawData, int offset, int length, N number)
      Parameters:
      rawData - rawData
      offset - offset
      length - length
      number - number
      Returns:
      a new data object.
    • newInstance

      T newInstance(byte[] rawData, int offset, int length)
      Parameters:
      rawData - rawData
      offset - offset
      length - length
      Returns:
      a new data object.
    • getTargetClass

      Class<? extends T> getTargetClass(N number)
      Parameters:
      number - number
      Returns:
      a Class object this factory instantiates by newInstance(byte[], int, int, NamedNumber) with the number argument.
    • getTargetClass

      Class<? extends T> getTargetClass()
      Returns:
      a Class object this factory instantiates by newInstance(byte[], int, int).