FtpClient
public 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
FileSystemException
public GenericFileName getRoot()
public FileSystemOptions getFileSystemOptions()
protected org.apache.commons.net.ftp.FTPClient createClient(GenericFileName rootName, UserAuthenticationData authData) throws FileSystemException
FileSystemException
public boolean isConnected() throws FileSystemException
isConnected
in interface FtpClient
FileSystemException
public void disconnect() throws java.io.IOException
disconnect
in interface FtpClient
java.io.IOException
public 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 FtpClient
java.io.IOException
public boolean deleteFile(java.lang.String relPath) throws java.io.IOException
deleteFile
in interface FtpClient
java.io.IOException
public 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 FtpClient
java.io.IOException
public boolean completePendingCommand() throws java.io.IOException
completePendingCommand
in interface FtpClient
java.io.IOException
public java.io.InputStream retrieveFileStream(java.lang.String relPath) throws java.io.IOException
retrieveFileStream
in interface FtpClient
java.io.IOException
public java.io.InputStream retrieveFileStream(java.lang.String relPath, long restartOffset) throws java.io.IOException
retrieveFileStream
in interface FtpClient
java.io.IOException
public java.io.OutputStream appendFileStream(java.lang.String relPath) throws java.io.IOException
appendFileStream
in interface FtpClient
java.io.IOException
public java.io.OutputStream storeFileStream(java.lang.String relPath) throws java.io.IOException
storeFileStream
in interface FtpClient
java.io.IOException
public boolean abort() throws java.io.IOException
public java.lang.String getReplyString() throws java.io.IOException
getReplyString
in interface FtpClient
java.io.IOException