Package org.pcap4j.packet
Class UnknownSctpChunk
- java.lang.Object
-
- org.pcap4j.packet.UnknownSctpChunk
-
- All Implemented Interfaces:
java.io.Serializable
,SctpPacket.SctpChunk
public final class UnknownSctpChunk extends java.lang.Object implements SctpPacket.SctpChunk
Unknown SCTP Chunk0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Chunk Type | Chunk Flags | Chunk Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ \ / Chunk Value / \ \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Since:
- pcap4j 1.6.6
- Author:
- Kaito Yamada
- See Also:
- RFC 4960, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnknownSctpChunk.Builder
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
UnknownSctpChunk.Builder
getBuilder()
byte
getFlags()
short
getLength()
int
getLengthAsInt()
byte[]
getPadding()
byte[]
getRawData()
SctpChunkType
getType()
byte[]
getValue()
int
hashCode()
int
length()
static UnknownSctpChunk
newInstance(byte[] rawData, int offset, int length)
A static factory method.java.lang.String
toString()
-
-
-
Method Detail
-
newInstance
public static UnknownSctpChunk 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 UnknownSctpChunk object.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getType
public SctpChunkType getType()
- Specified by:
getType
in interfaceSctpPacket.SctpChunk
- Returns:
- type
-
getFlags
public byte getFlags()
- Returns:
- flags
-
getLength
public short getLength()
- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()
- Returns:
- length
-
getValue
public byte[] getValue()
- Returns:
- value
-
getPadding
public byte[] getPadding()
- Returns:
- padding
-
getRawData
public byte[] getRawData()
- Specified by:
getRawData
in interfaceSctpPacket.SctpChunk
- Returns:
- raw data
-
length
public int length()
- Specified by:
length
in interfaceSctpPacket.SctpChunk
- Returns:
- length
-
getBuilder
public UnknownSctpChunk.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
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-