Package org.pcap4j.packet
Class IpV4InternetTimestampOption
- java.lang.Object
-
- org.pcap4j.packet.IpV4InternetTimestampOption
-
- All Implemented Interfaces:
java.io.Serializable
,IpV4Packet.IpV4Option
public final class IpV4InternetTimestampOption extends java.lang.Object implements IpV4Packet.IpV4Option
- Since:
- pcap4j 0.9.11
- Author:
- Kaito Yamada
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IpV4InternetTimestampOption.Builder
static interface
IpV4InternetTimestampOption.IpV4InternetTimestampOptionData
The interface representing an IPv4 internet timestamp option data.
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
IpV4InternetTimestampOption.Builder
getBuilder()
IpV4InternetTimestampOption.IpV4InternetTimestampOptionData
getData()
IpV4InternetTimestampOptionFlag
getFlag()
byte
getLength()
int
getLengthAsInt()
byte
getOverflow()
int
getOverflowAsInt()
byte
getPointer()
int
getPointerAsInt()
byte[]
getRawData()
IpV4OptionType
getType()
int
hashCode()
int
length()
static IpV4InternetTimestampOption
newInstance(byte[] rawData, int offset, int length)
A static factory method.java.lang.String
toString()
-
-
-
Method Detail
-
newInstance
public static IpV4InternetTimestampOption 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 IpV4InternetTimestampOption object.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getType
public IpV4OptionType getType()
- Specified by:
getType
in interfaceIpV4Packet.IpV4Option
- Returns:
- type
-
getLength
public byte getLength()
- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()
- Returns:
- length
-
getPointer
public byte getPointer()
- Returns:
- pointer
-
getPointerAsInt
public int getPointerAsInt()
- Returns:
- pointer
-
getOverflow
public byte getOverflow()
- Returns:
- overflow
-
getOverflowAsInt
public int getOverflowAsInt()
- Returns:
- overflow
-
getFlag
public IpV4InternetTimestampOptionFlag getFlag()
- Returns:
- flag
-
getData
public IpV4InternetTimestampOption.IpV4InternetTimestampOptionData getData()
- Returns:
- data, which may be null.
-
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
-
getBuilder
public IpV4InternetTimestampOption.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
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
-
-