Package org.pcap4j.packet
Class Ssh2NewKeysPacket
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket
-
- org.pcap4j.packet.Ssh2NewKeysPacket
-
public final class Ssh2NewKeysPacket extends AbstractPacket
- Since:
- pcap4j 1.0.1
- Author:
- Kaito Yamada
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Ssh2NewKeysPacket.Ssh2NewKeysHeader
-
Nested classes/interfaces inherited from class org.pcap4j.packet.AbstractPacket
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeader
-
Nested classes/interfaces inherited from interface org.pcap4j.packet.Packet
Packet.Builder, Packet.Header
-
-
Method Summary
Modifier and Type Method Description protected int
calcHashCode()
This method calculates the valuehashCode()
will return using the header's hash code and the payload's hash code.boolean
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.Packet.Builder
getBuilder()
Returns a new Builder object populated with this object's fields' values.Ssh2NewKeysPacket.Ssh2NewKeysHeader
getHeader()
Returns the Header object representing this packet's header.static Ssh2NewKeysPacket
getInstance()
static Ssh2NewKeysPacket
newPacket(byte[] rawData, int offset, int length)
A static factory method.-
Methods inherited from class org.pcap4j.packet.AbstractPacket
buildHexString, buildRawData, buildString, calcLength, getPayload, getRawData, hashCode, length, toHexString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pcap4j.packet.Packet
contains, get, getOuterOf, iterator
-
-
-
-
Method Detail
-
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 byByteArrays.validateBounds(byte[], int, int)
, which may throw exceptions undocumented here.- Parameters:
rawData
- rawDataoffset
- offsetlength
- length- Returns:
- the singleton instance of Ssh2NewKeysPacket.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getHeader
public Ssh2NewKeysPacket.Ssh2NewKeysHeader 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 interfacePacket
- Overrides:
getHeader
in classAbstractPacket
- 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 interfacePacket
- Specified by:
getBuilder
in classAbstractPacket
- Returns:
- a new Builder object populated with this object's fields values
-
equals
public boolean equals(java.lang.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 classAbstractPacket
-
calcHashCode
protected int calcHashCode()
Description copied from class:AbstractPacket
This method calculates the valuehashCode()
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 classAbstractPacket
- Returns:
- a calculated hash code value for the object
-
-