Class PropertiesBasedRadiotapDataFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.propertiesbased.PropertiesBasedRadiotapDataFactory
-
- All Implemented Interfaces:
PacketFactory<RadiotapPacket.RadiotapData,RadiotapPresentBitNumber>
public final class PropertiesBasedRadiotapDataFactory extends java.lang.Object implements PacketFactory<RadiotapPacket.RadiotapData,RadiotapPresentBitNumber>
- Since:
- pcap4j 1.6.5
-
-
Field Summary
Fields Modifier and Type Field Description private static PropertiesBasedRadiotapDataFactoryINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesBasedRadiotapDataFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertiesBasedRadiotapDataFactorygetInstance()java.lang.Class<? extends RadiotapPacket.RadiotapData>getTargetClass()java.lang.Class<? extends RadiotapPacket.RadiotapData>getTargetClass(RadiotapPresentBitNumber num)RadiotapPacket.RadiotapDatanewInstance(byte[] rawData, int offset, int length)RadiotapPacket.RadiotapDatanewInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends RadiotapPacket.RadiotapData> dataClass)RadiotapPacket.RadiotapDatanewInstance(byte[] rawData, int offset, int length, RadiotapPresentBitNumber num)
-
-
-
Field Detail
-
INSTANCE
private static final PropertiesBasedRadiotapDataFactory INSTANCE
-
-
Method Detail
-
getInstance
public static PropertiesBasedRadiotapDataFactory getInstance()
- Returns:
- the singleton instance of PropertiesBasedRadiotapDataFactory.
-
newInstance
public RadiotapPacket.RadiotapData newInstance(byte[] rawData, int offset, int length, RadiotapPresentBitNumber num)
- Specified by:
newInstancein interfacePacketFactory<RadiotapPacket.RadiotapData,RadiotapPresentBitNumber>- Parameters:
rawData- rawDataoffset- offsetlength- lengthnum- number- Returns:
- a new data object.
-
newInstance
public RadiotapPacket.RadiotapData newInstance(byte[] rawData, int offset, int length)
- Specified by:
newInstancein interfacePacketFactory<RadiotapPacket.RadiotapData,RadiotapPresentBitNumber>- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new data object.
-
newInstance
public RadiotapPacket.RadiotapData newInstance(byte[] rawData, int offset, int length, java.lang.Class<? extends RadiotapPacket.RadiotapData> dataClass)
- Parameters:
rawData- rawDataoffset- offsetlength- lengthdataClass- dataClass- Returns:
- a new RadiotapDataField 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 RadiotapPacket.RadiotapData> getTargetClass(RadiotapPresentBitNumber num)
- Specified by:
getTargetClassin interfacePacketFactory<RadiotapPacket.RadiotapData,RadiotapPresentBitNumber>- Parameters:
num- number- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int, NamedNumber)with the number argument.
-
getTargetClass
public java.lang.Class<? extends RadiotapPacket.RadiotapData> getTargetClass()
- Specified by:
getTargetClassin interfacePacketFactory<RadiotapPacket.RadiotapData,RadiotapPresentBitNumber>- Returns:
- a
Classobject this factory instantiates byPacketFactory.newInstance(byte[], int, int).
-
-