- java.lang.Object
-
- org.pcap4j.packet.TcpSackPermittedOption
-
- All Implemented Interfaces:
java.io.Serializable,TcpPacket.TcpOption
public final class TcpSackPermittedOption extends java.lang.Object implements TcpPacket.TcpOption
- Since:
- pcap4j 1.2.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static TcpSackPermittedOptionINSTANCEprivate static TcpOptionKindkindprivate static bytelengthprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateTcpSackPermittedOption()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TcpSackPermittedOptiongetInstance()TcpOptionKindgetKind()bytegetLength()intgetLengthAsInt()byte[]getRawData()intlength()static TcpSackPermittedOptionnewInstance(byte[] rawData, int offset, int length)A static factory method.private java.lang.ObjectreadResolve()java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INSTANCE
private static final TcpSackPermittedOption INSTANCE
-
kind
private static final TcpOptionKind kind
-
length
private static final byte length
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static TcpSackPermittedOption getInstance()
- Returns:
- the singleton instance of TcpSackPermittedOption.
-
newInstance
public static TcpSackPermittedOption 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:
- the singleton instance of TcpSackPermittedOption.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getKind
public TcpOptionKind 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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
readResolve
private java.lang.Object readResolve() throws java.io.ObjectStreamException- Throws:
java.io.ObjectStreamException
-
-