From 8d235ba3d78528bbe4f0625150f13c48be7e2fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Malek?= Date: Thu, 22 Nov 2018 11:35:26 +0100 Subject: [PATCH] Allow to query for server extensions available. --- src/main/java/net/schmizz/sshj/sftp/SFTPEngine.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/net/schmizz/sshj/sftp/SFTPEngine.java b/src/main/java/net/schmizz/sshj/sftp/SFTPEngine.java index 75e475e06..9b770dda3 100644 --- a/src/main/java/net/schmizz/sshj/sftp/SFTPEngine.java +++ b/src/main/java/net/schmizz/sshj/sftp/SFTPEngine.java @@ -108,6 +108,14 @@ public int getOperativeProtocolVersion() { return operativeVersion; } + public boolean supportsServerExtension(final String extension, final String domain) { + return serverExtensions.containsKey(extension + "@" + domain); + } + + public String getServerExtensionData(final String extension, final String domain) { + return serverExtensions.get(extension + "@" + domain); + } + public Request newExtendedRequest(String reqName) { return newRequest(PacketType.EXTENDED).putString(reqName); }