Class Ssh2NewKeysPacket

java.lang.Object
org.pcap4j.packet.AbstractPacket
org.pcap4j.packet.Ssh2NewKeysPacket
All Implemented Interfaces:
Serializable, Iterable<Packet>, Packet

public final class Ssh2NewKeysPacket extends AbstractPacket
Since:
pcap4j 1.0.1
See Also:
  • Field Details

  • Constructor Details

    • Ssh2NewKeysPacket

      private Ssh2NewKeysPacket()
  • Method Details

    • getInstance

      public static Ssh2NewKeysPacket getInstance()
      Returns:
      the singleton instance of Ssh2NewKeysPacket.
    • newPacket

      public static Ssh2NewKeysPacket newPacket(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:
      the singleton instance of Ssh2NewKeysPacket.
      Throws:
      IllegalRawDataException - if parsing the raw data fails.
    • getHeader

      Description copied from class: AbstractPacket
      Returns the Header object representing this packet's header. This subclass have to override this method if the packet represented by the subclass has a header.
      Specified by:
      getHeader in interface Packet
      Overrides:
      getHeader in class AbstractPacket
      Returns:
      the Header object representing this packet's header. May be null if the header doesn't exist
    • getBuilder

      public Packet.Builder getBuilder()
      Description copied from interface: Packet
      Returns a new Builder object populated with this object's fields' values.
      Specified by:
      getBuilder in interface Packet
      Specified by:
      getBuilder in class AbstractPacket
      Returns:
      a new Builder object populated with this object's fields values
    • equals

      public boolean equals(Object obj)
      Description copied from class: AbstractPacket
      Indicates whether some other object is "equal to" this one. This method firstly compares this packet's header using the header's equals(Object) method, then compares this packet's payload using the payload's equals(Object) method. If you write this subclass with fields which represent somethings other than header or payload, you need to override this method.
      Overrides:
      equals in class AbstractPacket
    • calcHashCode

      protected int calcHashCode()
      Description copied from class: AbstractPacket
      This method calculates the value hashCode() will return using the header's hash code and the payload's hash code. If you write this subclass which represents a packet with extra parts (e.g. a trailer), you need to override this method.
      Overrides:
      calcHashCode in class AbstractPacket
      Returns:
      a calculated hash code value for the object
    • readResolve

      private Object readResolve() throws ObjectStreamException
      Throws:
      ObjectStreamException