- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket
-
- org.pcap4j.packet.Ssh2NewKeysPacket
-
public final class Ssh2NewKeysPacket extends AbstractPacket
- Since:
- pcap4j 1.0.1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSsh2NewKeysPacket.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
-
-
Field Summary
Fields Modifier and Type Field Description private Ssh2NewKeysPacket.Ssh2NewKeysHeaderheaderprivate static Ssh2NewKeysPacketINSTANCEprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateSsh2NewKeysPacket()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcalcHashCode()This method calculates the valuehashCode()will return using the header's hash code and the payload's hash code.booleanequals(java.lang.Object obj)Indicates whether some other object is "equal to" this one.Packet.BuildergetBuilder()Returns a new Builder object populated with this object's fields' values.Ssh2NewKeysPacket.Ssh2NewKeysHeadergetHeader()Returns the Header object representing this packet's header.static Ssh2NewKeysPacketgetInstance()static Ssh2NewKeysPacketnewPacket(byte[] rawData, int offset, int length)A static factory method.private java.lang.ObjectreadResolve()-
Methods inherited from class org.pcap4j.packet.AbstractPacket
buildHexString, buildRawData, buildString, calcLength, contains, get, getOuterOf, getPayload, getRawData, hashCode, iterator, length, toHexString, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INSTANCE
private static final Ssh2NewKeysPacket INSTANCE
-
header
private final Ssh2NewKeysPacket.Ssh2NewKeysHeader header
-
-
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:AbstractPacketReturns 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:
getHeaderin interfacePacket- Overrides:
getHeaderin 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:PacketReturns a new Builder object populated with this object's fields' values.- Specified by:
getBuilderin interfacePacket- Specified by:
getBuilderin 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:AbstractPacketIndicates 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:
equalsin classAbstractPacket
-
calcHashCode
protected int calcHashCode()
Description copied from class:AbstractPacketThis 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:
calcHashCodein classAbstractPacket- Returns:
- a calculated hash code value for the object
-
readResolve
private java.lang.Object readResolve() throws java.io.ObjectStreamException- Throws:
java.io.ObjectStreamException
-
-