Package com.logicaldoc.importfolder.sftp
Class SFTPClient
java.lang.Object
com.logicaldoc.importfolder.sftp.SFTPClient
Wrapper over SFTP client
- Since:
- 8.0
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
ConstructorDescriptionSFTPClient
(com.jcraft.jsch.Session session, com.jcraft.jsch.Channel channel, com.jcraft.jsch.ChannelSftp channelSftp) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
connect()
void
connect
(int arg0) void
boolean
void
exit()
void
get
(String src, OutputStream dst) void
get
(String src, OutputStream dst, com.jcraft.jsch.SftpProgressMonitor monitor) void
get
(String arg0, OutputStream arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3, long arg4) void
void
void
int
int
getExtension
(String key) getHome()
int
getId()
int
com.jcraft.jsch.Session
void
int
hashCode()
boolean
isClosed()
boolean
boolean
isEOF()
void
void
logout()
lpwd()
Vector<com.jcraft.jsch.ChannelSftp.LsEntry>
void
com.jcraft.jsch.SftpATTRS
void
void
pput
(InputStream arg0, String arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3) void
put
(InputStream src, String dst) void
put
(InputStream src, String dst, int mode) void
put
(InputStream src, String dst, com.jcraft.jsch.SftpProgressMonitor monitor) void
put
(InputStream arg0, String arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3) void
void
void
void
pwd()
void
quit()
void
void
retrieveFile
(String path, OutputStream os) void
void
void
run()
void
sendSignal
(String signal) void
setAgentForwarding
(boolean enable) void
setBulkRequests
(int bulkRequests) void
setEnv
(byte[] name, byte[] value) void
void
void
setExtOutputStream
(OutputStream out, boolean dontclose) void
setFilenameEncoding
(String encoding) void
void
setInputStream
(InputStream in, boolean dontclose) void
void
void
setOutputStream
(OutputStream out, boolean dontclose) void
setPty
(boolean enable) void
setPtySize
(int arg0, int arg1, int arg2, int arg3) void
setPtyType
(String ttype) void
setPtyType
(String ttype, int col, int row, int wp, int hp) void
void
setTerminalMode
(byte[] terminalMode) void
setXForwarding
(boolean enable) void
start()
com.jcraft.jsch.SftpATTRS
com.jcraft.jsch.SftpStatVFS
void
toString()
version()
-
Constructor Details
-
SFTPClient
public SFTPClient(com.jcraft.jsch.Session session, com.jcraft.jsch.Channel channel, com.jcraft.jsch.ChannelSftp channelSftp)
-
-
Method Details
-
pput
public void pput(InputStream arg0, String arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
cd
- Throws:
com.jcraft.jsch.SftpException
-
chgrp
- Throws:
com.jcraft.jsch.SftpException
-
chmod
- Throws:
com.jcraft.jsch.SftpException
-
chown
- Throws:
com.jcraft.jsch.SftpException
-
connect
public void connect() throws com.jcraft.jsch.JSchException- Throws:
com.jcraft.jsch.JSchException
-
connect
public void connect(int arg0) throws com.jcraft.jsch.JSchException - Throws:
com.jcraft.jsch.JSchException
-
disconnect
public void disconnect() -
equals
-
exit
public void exit() -
get
- Throws:
com.jcraft.jsch.SftpException
-
get
public void get(String arg0, OutputStream arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3, long arg4) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
public void get(String src, OutputStream dst, com.jcraft.jsch.SftpProgressMonitor monitor) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
- Throws:
com.jcraft.jsch.SftpException
-
get
public InputStream get(String src, com.jcraft.jsch.SftpProgressMonitor monitor, int mode) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
public InputStream get(String arg0, com.jcraft.jsch.SftpProgressMonitor arg1, long arg2) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
public InputStream get(String src, com.jcraft.jsch.SftpProgressMonitor monitor) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
public void get(String arg0, String arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
public void get(String src, String dst, com.jcraft.jsch.SftpProgressMonitor monitor) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
get
- Throws:
com.jcraft.jsch.SftpException
-
get
- Throws:
com.jcraft.jsch.SftpException
-
getBulkRequests
public int getBulkRequests() -
getExitStatus
public int getExitStatus() -
getExtInputStream
- Throws:
IOException
-
getExtension
-
getHome
- Throws:
com.jcraft.jsch.SftpException
-
getId
public int getId() -
getInputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
getServerVersion
public int getServerVersion() throws com.jcraft.jsch.SftpException- Throws:
com.jcraft.jsch.SftpException
-
getSession
public com.jcraft.jsch.Session getSession() throws com.jcraft.jsch.JSchException- Throws:
com.jcraft.jsch.JSchException
-
hardlink
- Throws:
com.jcraft.jsch.SftpException
-
hashCode
public int hashCode() -
isClosed
public boolean isClosed() -
isConnected
public boolean isConnected() -
isEOF
public boolean isEOF() -
lcd
- Throws:
com.jcraft.jsch.SftpException
-
lpwd
-
ls
public void ls(String arg0, com.jcraft.jsch.ChannelSftp.LsEntrySelector arg1) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
ls
public Vector<com.jcraft.jsch.ChannelSftp.LsEntry> ls(String path) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
lstat
- Throws:
com.jcraft.jsch.SftpException
-
mkdir
- Throws:
com.jcraft.jsch.SftpException
-
put
- Throws:
com.jcraft.jsch.SftpException
-
put
public void put(InputStream arg0, String arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
put
public void put(InputStream src, String dst, com.jcraft.jsch.SftpProgressMonitor monitor) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
put
- Throws:
com.jcraft.jsch.SftpException
-
put
- Throws:
com.jcraft.jsch.SftpException
-
put
public OutputStream put(String arg0, com.jcraft.jsch.SftpProgressMonitor arg1, int arg2, long arg3) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
put
public OutputStream put(String dst, com.jcraft.jsch.SftpProgressMonitor monitor, int mode) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
put
- Throws:
com.jcraft.jsch.SftpException
-
put
public void put(String arg0, String arg1, com.jcraft.jsch.SftpProgressMonitor arg2, int arg3) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
put
public void put(String src, String dst, com.jcraft.jsch.SftpProgressMonitor monitor) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
put
- Throws:
com.jcraft.jsch.SftpException
-
put
- Throws:
com.jcraft.jsch.SftpException
-
pwd
- Throws:
com.jcraft.jsch.SftpException
-
quit
public void quit() -
readlink
- Throws:
com.jcraft.jsch.SftpException
-
realpath
- Throws:
com.jcraft.jsch.SftpException
-
rename
- Throws:
com.jcraft.jsch.SftpException
-
rm
- Throws:
com.jcraft.jsch.SftpException
-
rmdir
- Throws:
com.jcraft.jsch.SftpException
-
run
public void run() -
sendSignal
- Throws:
Exception
-
setAgentForwarding
public void setAgentForwarding(boolean enable) -
setBulkRequests
public void setBulkRequests(int bulkRequests) throws com.jcraft.jsch.JSchException - Throws:
com.jcraft.jsch.JSchException
-
setEnv
public void setEnv(byte[] name, byte[] value) -
setEnv
-
setExtOutputStream
-
setExtOutputStream
-
setFilenameEncoding
- Throws:
com.jcraft.jsch.SftpException
-
setInputStream
-
setInputStream
-
setMtime
- Throws:
com.jcraft.jsch.SftpException
-
setOutputStream
-
setOutputStream
-
setPty
public void setPty(boolean enable) -
setPtySize
public void setPtySize(int arg0, int arg1, int arg2, int arg3) -
setPtyType
-
setPtyType
-
setStat
public void setStat(String arg0, com.jcraft.jsch.SftpATTRS arg1) throws com.jcraft.jsch.SftpException - Throws:
com.jcraft.jsch.SftpException
-
setTerminalMode
public void setTerminalMode(byte[] terminalMode) -
setXForwarding
public void setXForwarding(boolean enable) -
start
public void start() throws com.jcraft.jsch.JSchException- Throws:
com.jcraft.jsch.JSchException
-
stat
- Throws:
com.jcraft.jsch.SftpException
-
statVFS
- Throws:
com.jcraft.jsch.SftpException
-
symlink
- Throws:
com.jcraft.jsch.SftpException
-
toString
-
version
-
retrieveFile
- Throws:
com.jcraft.jsch.SftpException
-
logout
public void logout()
-