Package net.schmizz.sshj.common
Class SSHPacket
-
Nested Class Summary
Nested classes/interfaces inherited from class net.schmizz.sshj.common.Buffer
Buffer.BufferException, Buffer.PlainBuffer
-
Field Summary
Fields inherited from class net.schmizz.sshj.common.Buffer
data, DEFAULT_SIZE, MAX_SIZE, MAX_UINT64_VALUE, rpos, wpos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionputMessageID
(Message msg) Writes a byte indicating the SSH message identifierReads an SSH byte and returns it asMessage
Methods inherited from class net.schmizz.sshj.common.Buffer
array, available, clear, compact, ensureAvailable, ensureCapacity, getCompactData, getNextPowerOf2, printHex, putBoolean, putBuffer, putByte, putBytes, putBytes, putMPInt, putPublicKey, putRawBytes, putRawBytes, putSensitiveString, putSignature, putString, putString, putString, putString, putUInt32, putUInt32FromInt, putUInt64, putUInt64, readBoolean, readByte, readBytes, readMPInt, readPublicKey, readRawBytes, readRawBytes, readString, readString, readStringAsBytes, readUInt32, readUInt32AsInt, readUInt64, readUInt64AsBigInteger, rpos, rpos, toString, wpos, wpos
-
Constructor Details
-
SSHPacket
public SSHPacket() -
SSHPacket
public SSHPacket(int size) -
SSHPacket
public SSHPacket(byte[] data) -
SSHPacket
Constructs new buffer for the specified SSH packet and reserves the needed space (5 bytes) for the packet header.- Parameters:
msg
- the SSH command
-
SSHPacket
-
-
Method Details
-
readMessageID
Reads an SSH byte and returns it asMessage
- Returns:
- the message identifier
- Throws:
Buffer.BufferException
-
putMessageID
Writes a byte indicating the SSH message identifier- Parameters:
msg
- the identifier as aMessage
type- Returns:
- this
-