Package net.schmizz.sshj.sftp
Class Response
- java.lang.Object
-
- net.schmizz.sshj.common.Buffer<T>
-
- net.schmizz.sshj.sftp.SFTPPacket<Response>
-
- net.schmizz.sshj.sftp.Response
-
public final class Response extends SFTPPacket<Response>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResponse.StatusCode-
Nested classes/interfaces inherited from class net.schmizz.sshj.common.Buffer
Buffer.BufferException, Buffer.PlainBuffer
-
-
Field Summary
Fields Modifier and Type Field Description private intprotocolVersionprivate longreqIDprivate PacketTypetype-
Fields inherited from class net.schmizz.sshj.common.Buffer
data, DEFAULT_SIZE, MAX_SIZE, MAX_UINT64_VALUE, rpos, wpos
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseensurePacketTypeIs(PacketType pt)ResponseensureStatusIs(Response.StatusCode acceptable)ResponseensureStatusPacketIsOK()protected java.lang.Stringerror(Response.StatusCode sc)intgetProtocolVersion()longgetRequestID()PacketTypegetType()Response.StatusCodereadStatusCode()-
Methods inherited from class net.schmizz.sshj.sftp.SFTPPacket
putFileAttributes, putType, readFileAttributes, readType
-
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
-
-
-
-
Field Detail
-
protocolVersion
private final int protocolVersion
-
type
private final PacketType type
-
reqID
private final long reqID
-
-
Constructor Detail
-
Response
public Response(Buffer<Response> pk, int protocolVersion) throws SFTPException
- Throws:
SFTPException
-
-
Method Detail
-
getProtocolVersion
public int getProtocolVersion()
-
getRequestID
public long getRequestID()
-
getType
public PacketType getType()
-
readStatusCode
public Response.StatusCode readStatusCode() throws SFTPException
- Throws:
SFTPException
-
ensurePacketTypeIs
public Response ensurePacketTypeIs(PacketType pt) throws SFTPException
- Throws:
SFTPException
-
ensureStatusPacketIsOK
public Response ensureStatusPacketIsOK() throws SFTPException
- Throws:
SFTPException
-
ensureStatusIs
public Response ensureStatusIs(Response.StatusCode acceptable) throws SFTPException
- Throws:
SFTPException
-
error
protected java.lang.String error(Response.StatusCode sc) throws SFTPException
- Throws:
SFTPException
-
-