Class PropertiesBasedIpV6OptionFactory
java.lang.Object
org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV6OptionFactory
- All Implemented Interfaces:
PacketFactory<IpV6ExtOptionsPacket.IpV6Option, IpV6OptionType>
public final class PropertiesBasedIpV6OptionFactory
extends Object
implements PacketFactory<IpV6ExtOptionsPacket.IpV6Option, IpV6OptionType>
- Since:
- pcap4j 0.9.14
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends IpV6ExtOptionsPacket.IpV6Option> Class<? extends IpV6ExtOptionsPacket.IpV6Option> getTargetClass(IpV6OptionType number) newInstance(byte[] rawData, int offset, int length) newInstance(byte[] rawData, int offset, int length, Class<? extends IpV6ExtOptionsPacket.IpV6Option> dataClass) newInstance(byte[] rawData, int offset, int length, IpV6OptionType number)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PropertiesBasedIpV6OptionFactory
private PropertiesBasedIpV6OptionFactory()
-
-
Method Details
-
getInstance
- Returns:
- the singleton instance of PropertiesBasedIpV6OptionFactory.
-
newInstance
public IpV6ExtOptionsPacket.IpV6Option newInstance(byte[] rawData, int offset, int length, IpV6OptionType number) - Specified by:
newInstancein interfacePacketFactory<IpV6ExtOptionsPacket.IpV6Option, IpV6OptionType>- Parameters:
rawData- rawDataoffset- offsetlength- lengthnumber- number- Returns:
- a new data object.
-
newInstance
- Specified by:
newInstancein interfacePacketFactory<IpV6ExtOptionsPacket.IpV6Option, IpV6OptionType>- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public IpV6ExtOptionsPacket.IpV6Option newInstance(byte[] rawData, int offset, int length, Class<? extends IpV6ExtOptionsPacket.IpV6Option> dataClass) - Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new IpV6Option object.
- Throws:
IllegalStateException- if an access to the newInstance method of the dataClass fails.IllegalArgumentException- if an exception other thanIllegalRawDataExceptionis thrown by newInstance method of the dataClass.NullPointerException- if any of arguments are null.
-
getTargetClass
- Specified by:
getTargetClassin interfacePacketFactory<IpV6ExtOptionsPacket.IpV6Option, IpV6OptionType>- Parameters:
number- number- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int, NamedNumber)with the number argument.
-
getTargetClass
- Specified by:
getTargetClassin interfacePacketFactory<IpV6ExtOptionsPacket.IpV6Option, IpV6OptionType>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-