Class PropertiesBasedIpV4InternetTimestampOptionDataFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV4InternetTimestampOptionDataFactory
-
- All Implemented Interfaces:
PacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData,IpV4InternetTimestampOptionFlag>
public final class PropertiesBasedIpV4InternetTimestampOptionDataFactory extends java.lang.Object implements PacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData,IpV4InternetTimestampOptionFlag>
- Since:
- pcap4j 0.9.16
-
-
Field Summary
Fields Modifier and Type Field Description private static PropertiesBasedIpV4InternetTimestampOptionDataFactoryINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesBasedIpV4InternetTimestampOptionDataFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertiesBasedIpV4InternetTimestampOptionDataFactorygetInstance()java.lang.Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData>getTargetClass()java.lang.Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData>getTargetClass(IpV4InternetTimestampOptionFlag flag)IpV4InternetTimestampOption.IpV4InternetTimestampOptionDatanewInstance(byte[] rawData, int offset, int length)IpV4InternetTimestampOption.IpV4InternetTimestampOptionDatanewInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> dataClass)IpV4InternetTimestampOption.IpV4InternetTimestampOptionDatanewInstance(byte[] rawData, int offset, int length, IpV4InternetTimestampOptionFlag flag)
-
-
-
Field Detail
-
INSTANCE
private static final PropertiesBasedIpV4InternetTimestampOptionDataFactory INSTANCE
-
-
Method Detail
-
getInstance
public static PropertiesBasedIpV4InternetTimestampOptionDataFactory 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, java.lang.Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> dataClass)
- Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new IpV4InternetTimestampOptionData object.
- Throws:
java.lang.IllegalStateException- if an access to the newInstance method of the dataClass fails.java.lang.IllegalArgumentException- if an exception other thanIllegalRawDataExceptionis thrown by newInstance method of the dataClass.java.lang.NullPointerException- if any of arguments are null.
-
getTargetClass
public java.lang.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 java.lang.Class<? extends IpV4InternetTimestampOption.IpV4InternetTimestampOptionData> getTargetClass()
- Specified by:
getTargetClassin interfacePacketFactory<IpV4InternetTimestampOption.IpV4InternetTimestampOptionData,IpV4InternetTimestampOptionFlag>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-
-