Package org.pcap4j.packet
Class IllegalSctpChunk
- java.lang.Object
-
- org.pcap4j.packet.IllegalSctpChunk
-
- All Implemented Interfaces:
java.io.Serializable
,IllegalRawDataHolder
,SctpPacket.SctpChunk
public final class IllegalSctpChunk extends java.lang.Object implements SctpPacket.SctpChunk, IllegalRawDataHolder
Illegal SCTP Chunk- Since:
- pcap4j 1.6.6
- Author:
- Kaito Yamada
- See Also:
- RFC 4960, Serialized Form
-
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
IllegalRawDataException
getCause()
byte[]
getRawData()
SctpChunkType
getType()
int
hashCode()
int
length()
static IllegalSctpChunk
newInstance(byte[] rawData, int offset, int length, IllegalRawDataException cause)
A static factory method.java.lang.String
toString()
-
-
-
Method Detail
-
newInstance
public static IllegalSctpChunk newInstance(byte[] rawData, int offset, int length, IllegalRawDataException cause)
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int)
, which may throw exceptions undocumented here.- Parameters:
rawData
- rawDataoffset
- offsetlength
- lengthcause
- cause- Returns:
- a new UnknownSctpChunk object.
-
getType
public SctpChunkType getType()
- Specified by:
getType
in interfaceSctpPacket.SctpChunk
- Returns:
- type
-
length
public int length()
- Specified by:
length
in interfaceSctpPacket.SctpChunk
- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawData
in interfaceIllegalRawDataHolder
- Specified by:
getRawData
in interfaceSctpPacket.SctpChunk
- Returns:
- raw data
-
getCause
public IllegalRawDataException getCause()
- Specified by:
getCause
in interfaceIllegalRawDataHolder
- Returns:
- an IllegalRawDataException which caused this to be instantiated.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-