Class TcpTimestampsOption
java.lang.Object
org.pcap4j.packet.TcpTimestampsOption
- All Implemented Interfaces:
Serializable, TcpPacket.TcpOption
- Since:
- pcap4j 1.2.0
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TcpOptionKindprivate final byteprivate static final longprivate final intprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTcpTimestampsOption(byte[] rawData, int offset, int length) private -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKind()byteintbyte[]intlongintlonginthashCode()intlength()static TcpTimestampsOptionnewInstance(byte[] rawData, int offset, int length) A static factory method.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
kind
-
length
private final byte length -
tsValue
private final int tsValue -
tsEchoReply
private final int tsEchoReply
-
-
Constructor Details
-
TcpTimestampsOption
- Throws:
IllegalRawDataException
-
TcpTimestampsOption
-
-
Method Details
-
newInstance
public static TcpTimestampsOption 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 TcpTimestampsOption object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getKind
- Specified by:
getKindin interfaceTcpPacket.TcpOption- Returns:
- kind
-
getLength
public byte getLength()- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()- Returns:
- length
-
getTsValue
public int getTsValue()- Returns:
- tsValue
-
getTsValueAsLong
public long getTsValueAsLong()- Returns:
- tsValue
-
getTsEchoReply
public int getTsEchoReply()- Returns:
- tsEchoReply
-
getTsEchoReplyAsLong
public long getTsEchoReplyAsLong()- Returns:
- tsEchoReply
-
length
public int length()- Specified by:
lengthin interfaceTcpPacket.TcpOption- Returns:
- length
-
getRawData
public byte[] getRawData()- Specified by:
getRawDatain interfaceTcpPacket.TcpOption- Returns:
- raw data
-
getBuilder
- Returns:
- a new Builder object populated with this object's fields.
-
toString
-
equals
-
hashCode
-