Package org.pcap4j.packet.factory.statik
Class StaticIpV6RoutingDataFactory
- java.lang.Object
-
- org.pcap4j.packet.factory.statik.StaticIpV6RoutingDataFactory
-
- All Implemented Interfaces:
PacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>
public final class StaticIpV6RoutingDataFactory extends java.lang.Object implements PacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>
- Since:
- pcap4j 0.9.16
- Author:
- Kaito Yamada
-
-
Method Summary
Modifier and Type Method Description static StaticIpV6RoutingDataFactory
getInstance()
IpV6ExtRoutingPacket.IpV6RoutingData
newInstance(byte[] rawData, int offset, int length)
This method is a variant ofnewInstance(byte[], int, int, IpV6RoutingType...)
and exists only for performance reason.IpV6ExtRoutingPacket.IpV6RoutingData
newInstance(byte[] rawData, int offset, int length, IpV6RoutingType number)
This method is a variant ofnewInstance(byte[], int, int, IpV6RoutingType...)
and exists only for performance reason.IpV6ExtRoutingPacket.IpV6RoutingData
newInstance(byte[] rawData, int offset, int length, IpV6RoutingType... numbers)
A factory method to build a packet or a packet field.IpV6ExtRoutingPacket.IpV6RoutingData
newInstance(byte[] rawData, int offset, int length, IpV6RoutingType number1, IpV6RoutingType number2)
This method is a variant ofnewInstance(byte[], int, int, IpV6RoutingType...)
and exists only for performance reason.
-
-
-
Method Detail
-
getInstance
public static StaticIpV6RoutingDataFactory getInstance()
- Returns:
- the singleton instance of StaticIpV6RoutingDataFactory.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length)
This method is a variant ofnewInstance(byte[], int, int, IpV6RoutingType...)
and exists only for performance reason.- Parameters:
rawData
- seePacketFactory.newInstance(byte[], int, int, N...)
.offset
- seePacketFactory.newInstance(byte[], int, int, N...)
.length
- seePacketFactory.newInstance(byte[], int, int, N...)
.- Returns:
- see
PacketFactory.newInstance(byte[], int, int, N...)
.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length, IpV6RoutingType number)
This method is a variant ofnewInstance(byte[], int, int, IpV6RoutingType...)
and exists only for performance reason.- Parameters:
rawData
- seePacketFactory.newInstance(byte[], int, int, N...)
.offset
- seePacketFactory.newInstance(byte[], int, int, N...)
.length
- seePacketFactory.newInstance(byte[], int, int, N...)
.number
- seePacketFactory.newInstance(byte[], int, int, N...)
.- Returns:
- see
PacketFactory.newInstance(byte[], int, int, N...)
.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length, IpV6RoutingType number1, IpV6RoutingType number2)
This method is a variant ofnewInstance(byte[], int, int, IpV6RoutingType...)
and exists only for performance reason.- Parameters:
rawData
- seePacketFactory.newInstance(byte[], int, int, N...)
.offset
- seePacketFactory.newInstance(byte[], int, int, N...)
.length
- seePacketFactory.newInstance(byte[], int, int, N...)
.number1
- seePacketFactory.newInstance(byte[], int, int, N...)
.number2
- seePacketFactory.newInstance(byte[], int, int, N...)
.- Returns:
- see
PacketFactory.newInstance(byte[], int, int, N...)
.
-
newInstance
public IpV6ExtRoutingPacket.IpV6RoutingData newInstance(byte[] rawData, int offset, int length, IpV6RoutingType... numbers)
Description copied from interface:PacketFactory
A factory method to build a packet or a packet field. The numbers are used as hints during the build. If no number is given, this method usually return an object which just wraps the specified part of the rawData without dissection. If one or more numbers are given, this method attempts to find a concrete class corresponding to the number for each of them in the order given. The class this method first find will be instantiated and returned. If no class is found, this method behaves in the same way as no number was given.This method doesn't throw
IllegalRawDataException
. Instead, if an IllegalRawDataException occurred during a packet dissection, this instantiatesIllegalRawDataPacket
(if T isPacket
) orIllegalRawDataHolder
(if T is notPacket
) and returns it.- Specified by:
newInstance
in interfacePacketFactory<IpV6ExtRoutingPacket.IpV6RoutingData,IpV6RoutingType>
- Parameters:
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.- Returns:
- a new packet or packet field object.
-
-