java.lang.Object
org.pcap4j.packet.TcpSackOption
- All Implemented Interfaces:
Serializable,TcpPacket.TcpOption
- Since:
- pcap4j 1.2.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TcpOptionKindprivate final byteprivate final List<TcpSackOption.Sack> private static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTcpSackOption(byte[] rawData, int offset, int length) privateTcpSackOption(TcpSackOption.Builder builder) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKind()byteintbyte[]inthashCode()intlength()static TcpSackOptionnewInstance(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 -
sacks
-
-
Constructor Details
-
TcpSackOption
- Throws:
IllegalRawDataException
-
TcpSackOption
-
-
Method Details
-
newInstance
public static TcpSackOption 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 TcpSackOption 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
-
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
public int hashCode()
-