Class PropertiesBasedIpV4TosFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedIpV4TosFactory
-
- All Implemented Interfaces:
PacketFactory<IpV4Packet.IpV4Tos,NotApplicable>
public final class PropertiesBasedIpV4TosFactory extends java.lang.Object implements PacketFactory<IpV4Packet.IpV4Tos,NotApplicable>
- Since:
- pcap4j 0.9.14
-
-
Field Summary
Fields Modifier and Type Field Description private static PropertiesBasedIpV4TosFactoryINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesBasedIpV4TosFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PropertiesBasedIpV4TosFactorygetInstance()java.lang.Class<? extends IpV4Packet.IpV4Tos>getTargetClass()java.lang.Class<? extends IpV4Packet.IpV4Tos>getTargetClass(NotApplicable number)Deprecated.IpV4Packet.IpV4TosnewInstance(byte[] rawData, int offset, int length)IpV4Packet.IpV4TosnewInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV4Packet.IpV4Tos> tosClass)A static factory method.IpV4Packet.IpV4TosnewInstance(byte[] rawData, int offset, int length, NotApplicable number)Deprecated.
-
-
-
Field Detail
-
INSTANCE
private static final PropertiesBasedIpV4TosFactory INSTANCE
-
-
Method Detail
-
getInstance
public static PropertiesBasedIpV4TosFactory getInstance()
- Returns:
- the singleton instance of PropertiesBasedIpV4TosFactory
-
newInstance
@Deprecated public IpV4Packet.IpV4Tos newInstance(byte[] rawData, int offset, int length, NotApplicable number)
Deprecated.- Specified by:
newInstancein interfacePacketFactory<IpV4Packet.IpV4Tos,NotApplicable>- Parameters:
rawData- rawDataoffset- offsetlength- lengthnumber- number- Returns:
- a new data object.
-
newInstance
public IpV4Packet.IpV4Tos newInstance(byte[] rawData, int offset, int length)
- Specified by:
newInstancein interfacePacketFactory<IpV4Packet.IpV4Tos,NotApplicable>- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public IpV4Packet.IpV4Tos newInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends IpV4Packet.IpV4Tos> tosClass)
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- Parameters:
rawData- rawDataoffset- offsetlength- lengthtosClass- tosClass- Returns:
- a new IpV4Tos object.
- Throws:
java.lang.IllegalStateException- if an access to the newInstance method of the tosClass fails.java.lang.IllegalArgumentException- if an exception is thrown by newInstance method of the tosClass.java.lang.NullPointerException- if any of arguments are null.
-
getTargetClass
@Deprecated public java.lang.Class<? extends IpV4Packet.IpV4Tos> getTargetClass(NotApplicable number)
Deprecated.- Specified by:
getTargetClassin interfacePacketFactory<IpV4Packet.IpV4Tos,NotApplicable>- Parameters:
number- number- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int, NamedNumber)with the number argument.
-
getTargetClass
public java.lang.Class<? extends IpV4Packet.IpV4Tos> getTargetClass()
- Specified by:
getTargetClassin interfacePacketFactory<IpV4Packet.IpV4Tos,NotApplicable>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-
-