Package org.pcap4j.packet
Class IpV4RecordRouteOption
- java.lang.Object
-
- org.pcap4j.packet.IpV4RecordRouteOption
-
- All Implemented Interfaces:
java.io.Serializable
,IpV4Packet.IpV4Option
public final class IpV4RecordRouteOption extends java.lang.Object
- Since:
- pcap4j 0.9.11
- Author:
- Kaito Yamada
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IpV4RecordRouteOption.Builder
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
IpV4RecordRouteOption.Builder
getBuilder()
byte
getLength()
int
getLengthAsInt()
byte
getPointer()
int
getPointerAsInt()
byte[]
getRawData()
java.util.List<java.net.Inet4Address>
getRouteData()
IpV4OptionType
getType()
int
hashCode()
int
length()
static IpV4RecordRouteOption
newInstance(byte[] rawData, int offset, int length)
A static factory method.java.lang.String
toString()
-
-
-
Method Detail
-
newInstance
public static IpV4RecordRouteOption newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int)
, which may throw exceptions undocumented here.- Parameters:
rawData
- rawDataoffset
- offsetlength
- length- Returns:
- a new IpV4RecordRouteOption object.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getType
public IpV4OptionType getType()
- Specified by:
getType
in interfaceIpV4Packet.IpV4Option
- Returns:
- type
-
getBuilder
public IpV4RecordRouteOption.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
getLength
public byte getLength()
- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()
- Returns:
- length
-
getPointer
public byte getPointer()
- Returns:
- pointer
-
getPointerAsInt
public int getPointerAsInt()
- Returns:
- pointer
-
getRouteData
public java.util.List<java.net.Inet4Address> getRouteData()
- Returns:
- routeData
-
length
public int length()
- Specified by:
length
in interfaceIpV4Packet.IpV4Option
- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawData
in interfaceIpV4Packet.IpV4Option
- Returns:
- raw data
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-