public final class StaticUnknownPacketFactory extends java.lang.Object implements PacketFactory<Packet,NamedNumber<?,?>>
| Modifier and Type | Method and Description |
|---|---|
static StaticUnknownPacketFactory |
getInstance() |
Packet |
newInstance(byte[] rawData,
int offset,
int length,
NamedNumber<?,?>... numbers)
A factory method to build a packet or a packet field.
|
public static StaticUnknownPacketFactory getInstance()
public Packet newInstance(byte[] rawData, int offset, int length, NamedNumber<?,?>... numbers)
PacketFactoryIllegalRawDataException. Instead, if an
IllegalRawDataException occurred during a packet dissection, this instantiates
IllegalRawDataPacket (if T is Packet) or IllegalRawDataHolder
(if T is not Packet) and returns it.newInstance in interface PacketFactory<Packet,NamedNumber<?,?>>rawData - a byte array including data this method will use for building a T instance.offset - offset of the data in the rawData.length - length of the data. The object to be returned is not required to use or represent
entire data. It means this length is not required to be exactly same as the
returning object's length, but is required to be not smaller than it.numbers - NamedNumber instances this method will refer to in order to decide
which concrete class to instantiate during building a T instance.Copyright © 2011 - 2018 Pcap4J.org. All rights reserved.