FtpClientpublic class FTPClientWrapper extends java.lang.Object implements FtpClient
I decided to not to use eg. noop() to determine the state of the connection to avoid unnecessary server round-trips.
| Modifier and Type | Field | Description |
|---|---|---|
protected FileSystemOptions |
fileSystemOptions |
| Modifier | Constructor | Description |
|---|---|---|
protected |
FTPClientWrapper(GenericFileName root,
FileSystemOptions fileSystemOptions) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
abort() |
|
java.io.OutputStream |
appendFileStream(java.lang.String relPath) |
|
boolean |
completePendingCommand() |
|
protected org.apache.commons.net.ftp.FTPClient |
createClient(GenericFileName rootName,
UserAuthenticationData authData) |
|
boolean |
deleteFile(java.lang.String relPath) |
|
void |
disconnect() |
|
FileSystemOptions |
getFileSystemOptions() |
|
java.lang.String |
getReplyString() |
|
GenericFileName |
getRoot() |
|
boolean |
isConnected() |
|
org.apache.commons.net.ftp.FTPFile[] |
listFiles(java.lang.String relPath) |
|
boolean |
makeDirectory(java.lang.String relPath) |
|
boolean |
removeDirectory(java.lang.String relPath) |
|
boolean |
rename(java.lang.String oldName,
java.lang.String newName) |
|
java.io.InputStream |
retrieveFileStream(java.lang.String relPath) |
|
java.io.InputStream |
retrieveFileStream(java.lang.String relPath,
long restartOffset) |
|
java.io.OutputStream |
storeFileStream(java.lang.String relPath) |
protected final FileSystemOptions fileSystemOptions
protected FTPClientWrapper(GenericFileName root, FileSystemOptions fileSystemOptions) throws FileSystemException
FileSystemExceptionpublic GenericFileName getRoot()
public FileSystemOptions getFileSystemOptions()
protected org.apache.commons.net.ftp.FTPClient createClient(GenericFileName rootName, UserAuthenticationData authData) throws FileSystemException
FileSystemExceptionpublic boolean isConnected() throws FileSystemException
isConnected in interface FtpClientFileSystemExceptionpublic void disconnect() throws java.io.IOException
disconnect in interface FtpClientjava.io.IOExceptionpublic org.apache.commons.net.ftp.FTPFile[] listFiles(java.lang.String relPath) throws java.io.IOException
public boolean removeDirectory(java.lang.String relPath) throws java.io.IOException
removeDirectory in interface FtpClientjava.io.IOExceptionpublic boolean deleteFile(java.lang.String relPath) throws java.io.IOException
deleteFile in interface FtpClientjava.io.IOExceptionpublic boolean rename(java.lang.String oldName, java.lang.String newName) throws java.io.IOException
public boolean makeDirectory(java.lang.String relPath) throws java.io.IOException
makeDirectory in interface FtpClientjava.io.IOExceptionpublic boolean completePendingCommand() throws java.io.IOException
completePendingCommand in interface FtpClientjava.io.IOExceptionpublic java.io.InputStream retrieveFileStream(java.lang.String relPath) throws java.io.IOException
retrieveFileStream in interface FtpClientjava.io.IOExceptionpublic java.io.InputStream retrieveFileStream(java.lang.String relPath, long restartOffset) throws java.io.IOException
retrieveFileStream in interface FtpClientjava.io.IOExceptionpublic java.io.OutputStream appendFileStream(java.lang.String relPath) throws java.io.IOException
appendFileStream in interface FtpClientjava.io.IOExceptionpublic java.io.OutputStream storeFileStream(java.lang.String relPath) throws java.io.IOException
storeFileStream in interface FtpClientjava.io.IOExceptionpublic boolean abort() throws java.io.IOException
public java.lang.String getReplyString() throws java.io.IOException
getReplyString in interface FtpClientjava.io.IOException