public class SftpCommand extends Object implements Channel
Modifier and Type | Class and Description |
---|---|
static interface |
SftpCommand.CommandExecutor |
Constructor and Description |
---|
SftpCommand(SftpClient client) |
Modifier and Type | Method and Description |
---|---|
protected <A extends Appendable> |
appendFileAttributes(A stdout,
SftpClient sftp,
String path,
SftpClient.Attributes attrs) |
void |
close() |
void |
doInteractive(BufferedReader stdin,
PrintStream stdout,
PrintStream stderr) |
SftpClient |
getClient() |
String |
getCurrentLocalDirectory() |
String |
getCurrentRemoteDirectory() |
boolean |
isOpen() |
static void |
main(String[] args) |
protected String |
resolveLocalPath(String pathArg) |
protected String |
resolveRemotePath(String pathArg) |
void |
setCurrentLocalDirectory(String path) |
void |
setCurrentRemoteDirectory(String path) |
public SftpCommand(SftpClient client)
public final SftpClient getClient()
public void doInteractive(BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Exception
Exception
protected <A extends Appendable> A appendFileAttributes(A stdout, SftpClient sftp, String path, SftpClient.Attributes attrs) throws IOException
IOException
public String getCurrentRemoteDirectory()
public void setCurrentRemoteDirectory(String path)
public String getCurrentLocalDirectory()
public void setCurrentLocalDirectory(String path)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.