public final class PropertiesBasedTcpOptionFactory extends Object implements PacketFactory<TcpPacket.TcpOption,TcpOptionKind>
Modifier and Type | Method and Description |
---|---|
static PropertiesBasedTcpOptionFactory |
getInstance() |
Class<? extends TcpPacket.TcpOption> |
getTargetClass() |
Class<? extends TcpPacket.TcpOption> |
getTargetClass(TcpOptionKind number) |
TcpPacket.TcpOption |
newInstance(byte[] rawData,
int offset,
int length) |
TcpPacket.TcpOption |
newInstance(byte[] rawData,
int offset,
int length,
Class<? extends TcpPacket.TcpOption> dataClass) |
TcpPacket.TcpOption |
newInstance(byte[] rawData,
int offset,
int length,
TcpOptionKind number) |
public static PropertiesBasedTcpOptionFactory getInstance()
public TcpPacket.TcpOption newInstance(byte[] rawData, int offset, int length, TcpOptionKind number)
newInstance
in interface PacketFactory<TcpPacket.TcpOption,TcpOptionKind>
rawData
- rawDataoffset
- offsetlength
- lengthnumber
- numberpublic TcpPacket.TcpOption newInstance(byte[] rawData, int offset, int length)
newInstance
in interface PacketFactory<TcpPacket.TcpOption,TcpOptionKind>
rawData
- rawDataoffset
- offsetlength
- lengthpublic TcpPacket.TcpOption newInstance(byte[] rawData, int offset, int length, Class<? extends TcpPacket.TcpOption> 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 TcpPacket.TcpOption> getTargetClass(TcpOptionKind number)
getTargetClass
in interface PacketFactory<TcpPacket.TcpOption,TcpOptionKind>
number
- numberClass
object this factory instantiates
by PacketFactory.newInstance(byte[], int, int, NamedNumber)
with the number argument.public Class<? extends TcpPacket.TcpOption> getTargetClass()
getTargetClass
in interface PacketFactory<TcpPacket.TcpOption,TcpOptionKind>
Class
object this factory instantiates
by PacketFactory.newInstance(byte[], int, int)
.Copyright © 2011–2016 Pcap4J.org. All rights reserved.