Class PropertiesBasedIpV4InternetTimestampOptionDataFactory
java.lang.Object
org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV4InternetTimestampOptionDataFactory
- All Implemented Interfaces:
PacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData, IpV4InternetTimestampOptionFlag>
public final class PropertiesBasedIpV4InternetTimestampOptionDataFactory
extends Object
implements PacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData, IpV4InternetTimestampOptionFlag>
- Since:
- pcap4j 0.9.16
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PropertiesBasedIpV4InternetTimestampOptionDataFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(byte[] rawData, int offset, int length) newInstance(byte[] rawData, int offset, int length, Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> dataClass) newInstance(byte[] rawData, int offset, int length, IpV4InternetTimestampOptionFlag flag)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PropertiesBasedIpV4InternetTimestampOptionDataFactory
private PropertiesBasedIpV4InternetTimestampOptionDataFactory()
-
-
Method Details
-
getInstance
- Returns:
- the singleton instance of PropertiesBasedIpV4InternetTimestampDataFactory.
-
newInstance
public IpV4InternetTimestampOption.IpV4InternetTimestampOptionData newInstance(byte[] rawData, int offset, int length, IpV4InternetTimestampOptionFlag flag) - Specified by:
newInstancein interfacePacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData, IpV4InternetTimestampOptionFlag>- Parameters:
rawData- rawDataoffset- offsetlength- lengthflag- number- Returns:
- a new data object.
-
newInstance
public IpV4InternetTimestampOption.IpV4InternetTimestampOptionData newInstance(byte[] rawData, int offset, int length) - Specified by:
newInstancein interfacePacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData, IpV4InternetTimestampOptionFlag>- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public IpV4InternetTimestampOption.IpV4InternetTimestampOptionData newInstance(byte[] rawData, int offset, int length, Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> dataClass) - Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new IpV4InternetTimestampOptionData 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
public Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> getTargetClass(IpV4InternetTimestampOptionFlag flag) - Specified by:
getTargetClassin interfacePacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData, IpV4InternetTimestampOptionFlag>- Parameters:
flag- number- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int, NamedNumber)with the number argument.
-
getTargetClass
public Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> getTargetClass()- Specified by:
getTargetClassin interfacePacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData, IpV4InternetTimestampOptionFlag>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-