public final class PropertiesBasedIpV4OptionFactory extends Object implements PacketFactory<IpV4Packet.IpV4Option,IpV4OptionType>
Modifier and Type | Method and Description |
---|---|
static PropertiesBasedIpV4OptionFactory |
getInstance() |
Class<? extends IpV4Packet.IpV4Option> |
getTargetClass() |
Class<? extends IpV4Packet.IpV4Option> |
getTargetClass(IpV4OptionType number) |
IpV4Packet.IpV4Option |
newInstance(byte[] rawData,
int offset,
int length) |
IpV4Packet.IpV4Option |
newInstance(byte[] rawData,
int offset,
int length,
Class<? extends IpV4Packet.IpV4Option> dataClass) |
IpV4Packet.IpV4Option |
newInstance(byte[] rawData,
int offset,
int length,
IpV4OptionType number) |
public static PropertiesBasedIpV4OptionFactory getInstance()
public IpV4Packet.IpV4Option newInstance(byte[] rawData, int offset, int length, IpV4OptionType number)
newInstance
in interface PacketFactory<IpV4Packet.IpV4Option,IpV4OptionType>
rawData
- rawDataoffset
- offsetlength
- lengthnumber
- numberpublic IpV4Packet.IpV4Option newInstance(byte[] rawData, int offset, int length)
newInstance
in interface PacketFactory<IpV4Packet.IpV4Option,IpV4OptionType>
rawData
- rawDataoffset
- offsetlength
- lengthpublic IpV4Packet.IpV4Option newInstance(byte[] rawData, int offset, int length, Class<? extends IpV4Packet.IpV4Option> dataClass)
rawData
- rawDataoffset
- offsetlength
- lengthdataClass
- dataClassIllegalStateException
- if an access to the newInstance method of the dataClass fails.IllegalArgumentException
- if an exception other than IllegalRawDataException
is thrown by newInstance method of the dataClass.NullPointerException
- if any of arguments are null.public Class<? extends IpV4Packet.IpV4Option> getTargetClass(IpV4OptionType number)
getTargetClass
in interface PacketFactory<IpV4Packet.IpV4Option,IpV4OptionType>
number
- numberClass
object this factory instantiates
by PacketFactory.newInstance(byte[], int, int, NamedNumber)
with the number argument.public Class<? extends IpV4Packet.IpV4Option> getTargetClass()
getTargetClass
in interface PacketFactory<IpV4Packet.IpV4Option,IpV4OptionType>
Class
object this factory instantiates
by PacketFactory.newInstance(byte[], int, int)
.Copyright © 2011–2016 Pcap4J.org. All rights reserved.