public class FTPSConnector extends java.lang.Object implements Connector
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_CWD |
static int |
ACTION_DEL |
static int |
ACTION_GET |
static int |
ACTION_LIST |
static int |
ACTION_MKD |
static int |
ACTION_PUT |
static int |
ACTION_PWD |
static int |
ACTION_RMD |
static int |
ACTION_SIZE |
static int |
ACTION_TIME |
static int |
FTP_ALL |
static int |
FTP_DIRECTORY |
static int |
FTP_FILE |
static int |
FTP_LINK |
static int |
FTP_UNKNOWN |
protected java.lang.String |
uri |
Constructor and Description |
---|
FTPSConnector(java.util.Map props)
Creates new FTPSConnector
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
completePendingCommand() |
protected void |
connect() |
java.lang.String |
createDirectory(java.lang.String dirname,
int retry)
It checks the existence of the directory tree on the server and creates
the missing ones if necessary.
|
boolean |
ftpsCwd(java.lang.String pathname) |
boolean |
ftpsDelete(java.lang.String pathname) |
java.lang.String |
ftpsGet(java.io.File localFile,
java.lang.String filename) |
java.lang.String |
ftpsGet(java.io.OutputStream out,
java.lang.String filename) |
java.lang.String |
ftpsGet(java.lang.StringBuffer strBuf,
java.lang.String filename) |
java.lang.String[] |
ftpsList(java.lang.String dirname,
int type)
It returns an array of strings for requested files of type.
|
boolean |
ftpsMkd(java.lang.String pathname) |
boolean |
ftpsNoOp() |
java.lang.String |
ftpsPut(java.io.File localFile,
java.lang.String filename) |
java.lang.String |
ftpsPut(java.io.InputStream in,
java.lang.String filename) |
java.lang.String |
ftpsPut(java.lang.String payload,
java.lang.String filename) |
java.lang.String |
ftpsPwd() |
boolean |
ftpsRmd(java.lang.String pathname) |
org.apache.commons.net.ftp.FTPSClient |
getFTPSClient() |
static java.lang.String |
getParent(java.lang.String filename)
It returns dirname of the filename or null if it is a relative path.
|
int |
getReplyCode() |
java.lang.String |
getReplyString() |
long |
getSize(java.lang.String remote)
returns the file size or -1 in case of failure
|
long |
getTimestamp(java.lang.String remote)
returns the mtime or -1 in case of failure
|
java.lang.String |
getURI() |
boolean |
isConnected() |
static void |
main(java.lang.String[] args) |
java.lang.String |
reconnect()
It reconnects and returns null or error message upon failure
|
java.io.InputStream |
retrieveFileStream(java.lang.String remote) |
java.io.OutputStream |
storeFileStream(java.lang.String remote) |
protected java.lang.String uri
public static final int FTP_ALL
public static final int FTP_FILE
public static final int FTP_DIRECTORY
public static final int FTP_LINK
public static final int FTP_UNKNOWN
public static final int ACTION_PWD
public static final int ACTION_CWD
public static final int ACTION_MKD
public static final int ACTION_RMD
public static final int ACTION_LIST
public static final int ACTION_GET
public static final int ACTION_PUT
public static final int ACTION_DEL
public static final int ACTION_SIZE
public static final int ACTION_TIME
public FTPSConnector(java.util.Map props) throws java.io.IOException
java.io.IOException
protected void connect() throws java.io.IOException
java.io.IOException
public boolean isConnected()
isConnected
in interface Connector
public java.lang.String reconnect()
public java.lang.String ftpsGet(java.io.File localFile, java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String ftpsGet(java.lang.StringBuffer strBuf, java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String ftpsGet(java.io.OutputStream out, java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String ftpsPut(java.io.File localFile, java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String ftpsPut(java.lang.String payload, java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String ftpsPut(java.io.InputStream in, java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String[] ftpsList(java.lang.String dirname, int type) throws java.io.IOException
java.io.IOException
public java.lang.String ftpsPwd() throws java.io.IOException
java.io.IOException
public boolean ftpsCwd(java.lang.String pathname) throws java.io.IOException
java.io.IOException
public boolean ftpsMkd(java.lang.String pathname) throws java.io.IOException
java.io.IOException
public boolean ftpsRmd(java.lang.String pathname) throws java.io.IOException
java.io.IOException
public boolean ftpsDelete(java.lang.String pathname) throws java.io.IOException
java.io.IOException
public boolean ftpsNoOp() throws java.io.IOException
java.io.IOException
public boolean completePendingCommand() throws java.io.IOException
java.io.IOException
public int getReplyCode() throws java.io.IOException
java.io.IOException
public java.lang.String getReplyString() throws java.io.IOException
java.io.IOException
public java.lang.String createDirectory(java.lang.String dirname, int retry) throws java.io.IOException
java.io.IOException
public static java.lang.String getParent(java.lang.String filename)
public org.apache.commons.net.ftp.FTPSClient getFTPSClient()
public java.io.InputStream retrieveFileStream(java.lang.String remote) throws java.io.IOException
java.io.IOException
public java.io.OutputStream storeFileStream(java.lang.String remote) throws java.io.IOException
java.io.IOException
public long getSize(java.lang.String remote) throws java.io.IOException
java.io.IOException
public long getTimestamp(java.lang.String remote) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)