Class UnknownSctpChunk

java.lang.Object
org.pcap4j.packet.UnknownSctpChunk
All Implemented Interfaces:
Serializable, SctpPacket.SctpChunk

public final class UnknownSctpChunk extends Object implements SctpPacket.SctpChunk
Unknown SCTP Chunk
 0                   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
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • type

      private final SctpChunkType type
    • flags

      private final byte flags
    • length

      private final short length
    • value

      private final byte[] value
    • padding

      private final byte[] padding
  • Constructor Details

  • Method Details

    • newInstance

      public static UnknownSctpChunk newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
      A static factory method. This method validates the arguments by ByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.
      Parameters:
      rawData - rawData
      offset - offset
      length - length
      Returns:
      a new UnknownSctpChunk object.
      Throws:
      IllegalRawDataException - if parsing the raw data fails.
    • getType

      public SctpChunkType getType()
      Specified by:
      getType in interface SctpPacket.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 interface SctpPacket.SctpChunk
      Returns:
      raw data
    • length

      public int length()
      Specified by:
      length in interface SctpPacket.SctpChunk
      Returns:
      length
    • getBuilder

      public UnknownSctpChunk.Builder getBuilder()
      Returns:
      a new Builder object populated with this object's fields.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object