Class Ssh2NewKeysPacket
java.lang.Object
org.pcap4j.packet.AbstractPacket
org.pcap4j.packet.Ssh2NewKeysPacket
- All Implemented Interfaces:
Serializable, Iterable<Packet>, Packet
- Since:
- pcap4j 1.0.1
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractPacket
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeaderNested classes/interfaces inherited from interface Packet
Packet.Builder, Packet.Header -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Ssh2NewKeysPacket.Ssh2NewKeysHeaderprivate static final Ssh2NewKeysPacketprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intThis method calculates the valuehashCode()will return using the header's hash code and the payload's hash code.booleanIndicates whether some other object is "equal to" this one.Returns a new Builder object populated with this object's fields' values.Returns the Header object representing this packet's header.static Ssh2NewKeysPacketstatic Ssh2NewKeysPacketnewPacket(byte[] rawData, int offset, int length) A static factory method.private ObjectMethods inherited from class AbstractPacket
buildHexString, buildRawData, buildString, calcLength, contains, get, getOuterOf, getPayload, getRawData, hashCode, iterator, length, toHexString, toStringMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSTANCE
-
header
-
-
Constructor Details
-
Ssh2NewKeysPacket
private Ssh2NewKeysPacket()
-
-
Method Details
-
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
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
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
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
- Throws:
ObjectStreamException
-