Added method to created Stateful clients ( #268). (#603)

Co-authored-by: Daniel Rodriguez <daniel.rodriguez@elca.ch>
This commit is contained in:
dajoropo
2020-06-22 12:05:11 +02:00
committed by GitHub
parent eb19325bc6
commit 769c896e53

View File

@@ -722,6 +722,19 @@ public class SSHClient
return new SFTPClient(new SFTPEngine(this).init());
}
/**
* Stateful FTP client is required in order to connect to Serv-U FTP servers.
* @return Instantiated {@link SFTPClient} implementation.
*
* @throws IOException if there is an error starting the {@code sftp} subsystem
*/
public SFTPClient newStatefulSFTPClient()
throws IOException {
checkConnected();
checkAuthenticated();
return new StatefulSFTPClient(new SFTPEngine(this).init());
}
/**
* Does key re-exchange.
*