public class SFTPClient extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
HTTP_DEFAULT_PORT |
static String |
PROXY_TYPE_HTTP |
static String |
PROXY_TYPE_SOCKS5 |
static String |
SOCKS5_DEFAULT_PORT |
static int |
SSH_DEFAULT_PORT |
| 构造器和说明 |
|---|
SFTPClient(InetAddress serverIP,
int serverPort,
String userName)
Init Helper Class with connection settings
|
SFTPClient(InetAddress serverIP,
int serverPort,
String userName,
String privateKeyFilename)
Init Helper Class with connection settings
|
SFTPClient(InetAddress serverIP,
int serverPort,
String userName,
String privateKeyFilename,
String passPhrase)
Init Helper Class with connection settings
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
chdir(String dirToChangeTo) |
void |
createFolder(String path)
Creates the given folder.
|
void |
delete(String file) |
String[] |
dir() |
void |
disconnect() |
boolean |
folderExists(String foldername) |
void |
get(org.apache.commons.vfs2.FileObject localFile,
String remoteFile) |
void |
get(String localFilePath,
String remoteFile)
已过时。
|
String |
getCompression() |
org.apache.commons.vfs2.FileType |
getFileType(String filename) |
String |
getPassword() |
String |
GetPrivateKeyFileName() |
String |
GetPrivateKeyPassPhrase() |
InetAddress |
getServerIP() |
int |
getServerPort() |
String |
getUserName() |
void |
login(String password) |
void |
put(org.apache.commons.vfs2.FileObject fileObject,
String remoteFile) |
void |
put(InputStream inputStream,
String remoteFile) |
String |
pwd() |
void |
renameFile(String sourcefilename,
String destinationfilename)
Rename the file.
|
void |
setCompression(String compression) |
void |
setProxy(String host,
String port,
String user,
String pass,
String proxyType) |
public static final int SSH_DEFAULT_PORT
public SFTPClient(InetAddress serverIP, int serverPort, String userName) throws org.pentaho.di.core.exception.KettleJobException
serverIP - IP address of remote serverserverPort - port of remote serveruserName - username of remote serverorg.pentaho.di.core.exception.KettleJobExceptionpublic SFTPClient(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename) throws org.pentaho.di.core.exception.KettleJobException
serverIP - IP address of remote serverserverPort - port of remote serveruserName - username of remote serverprivateKeyFilename - filename of private keyorg.pentaho.di.core.exception.KettleJobExceptionpublic SFTPClient(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename, String passPhrase) throws org.pentaho.di.core.exception.KettleJobException
serverIP - IP address of remote serverserverPort - port of remote serveruserName - username of remote serverprivateKeyFilename - filename of private keypassPhrase - passphraseorg.pentaho.di.core.exception.KettleJobExceptionpublic void login(String password) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void chdir(String dirToChangeTo) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic String[] dir() throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void get(org.apache.commons.vfs2.FileObject localFile,
String remoteFile)
throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobException@Deprecated public void get(String localFilePath, String remoteFile) throws org.pentaho.di.core.exception.KettleJobException
get(FileObject, String)localFilePath - remoteFile - org.pentaho.di.core.exception.KettleJobExceptionpublic String pwd() throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void put(org.apache.commons.vfs2.FileObject fileObject,
String remoteFile)
throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void put(InputStream inputStream, String remoteFile) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void delete(String file) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void createFolder(String path) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void renameFile(String sourcefilename, String destinationfilename) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic org.apache.commons.vfs2.FileType getFileType(String filename) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic boolean folderExists(String foldername)
public void setProxy(String host, String port, String user, String pass, String proxyType) throws org.pentaho.di.core.exception.KettleJobException
org.pentaho.di.core.exception.KettleJobExceptionpublic void disconnect()
public String GetPrivateKeyFileName()
public String GetPrivateKeyPassPhrase()
public String getPassword()
public int getServerPort()
public String getUserName()
public InetAddress getServerIP()
public void setCompression(String compression)
public String getCompression()
Copyright © 2024 Hitachi Vantara. All rights reserved.