| Modifier and Type | Field and Description |
|---|---|
protected FileSystemOptions |
fileSystemOptions |
| Modifier | Constructor and Description |
|---|---|
protected |
FTPClientWrapper(GenericFileName root,
FileSystemOptions fileSystemOptions) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort() |
OutputStream |
appendFileStream(String relPath) |
boolean |
completePendingCommand() |
protected org.apache.commons.net.ftp.FTPClient |
createClient(GenericFileName rootName,
UserAuthenticationData authData) |
boolean |
deleteFile(String relPath) |
void |
disconnect() |
FileSystemOptions |
getFileSystemOptions() |
int |
getReplyCode() |
String |
getReplyString() |
GenericFileName |
getRoot() |
boolean |
hasFeature(String feature)
Queries the server for a supported feature.
|
boolean |
isConnected() |
org.apache.commons.net.ftp.FTPFile[] |
listFiles(String relPath) |
boolean |
makeDirectory(String relPath) |
Instant |
mdtmInstant(String relPath)
Sends the MDTM command to get a file's date and time information after file transfer.
|
boolean |
removeDirectory(String relPath) |
boolean |
rename(String oldName,
String newName) |
InputStream |
retrieveFileStream(String relPath) |
InputStream |
retrieveFileStream(String relPath,
int bufferSize) |
InputStream |
retrieveFileStream(String relPath,
long restartOffset) |
void |
setBufferSize(int bufferSize) |
OutputStream |
storeFileStream(String relPath) |
protected final FileSystemOptions fileSystemOptions
protected FTPClientWrapper(GenericFileName root, FileSystemOptions fileSystemOptions) throws FileSystemException
FileSystemExceptionpublic boolean abort()
throws IOException
abort in interface FtpClientIOExceptionpublic OutputStream appendFileStream(String relPath) throws IOException
appendFileStream in interface FtpClientIOExceptionpublic boolean completePendingCommand()
throws IOException
completePendingCommand in interface FtpClientIOExceptionprotected org.apache.commons.net.ftp.FTPClient createClient(GenericFileName rootName, UserAuthenticationData authData) throws FileSystemException
FileSystemExceptionpublic boolean deleteFile(String relPath) throws IOException
deleteFile in interface FtpClientIOExceptionpublic void disconnect()
throws IOException
disconnect in interface FtpClientIOExceptionpublic FileSystemOptions getFileSystemOptions()
public int getReplyCode()
throws IOException
getReplyCode in interface FtpClientIOExceptionpublic String getReplyString() throws IOException
getReplyString in interface FtpClientIOExceptionpublic GenericFileName getRoot()
public boolean hasFeature(String feature) throws IOException
hasFeature in interface FtpClientfeature - the name of the feature, converted to upper case.true if the feature is present, false if the feature is not present or the FTP command
failed.IOException - on errorpublic boolean isConnected()
throws FileSystemException
isConnected in interface FtpClientFileSystemExceptionpublic org.apache.commons.net.ftp.FTPFile[] listFiles(String relPath) throws IOException
listFiles in interface FtpClientIOExceptionpublic boolean makeDirectory(String relPath) throws IOException
makeDirectory in interface FtpClientIOExceptionpublic Instant mdtmInstant(String relPath) throws IOException
"LIST" command response. Time values are always represented in UTC (GMT), and in the
Gregorian calendar regardless of what calendar may have been in use at the date and time the file was last
modified.
NOTE: not all remote FTP servers support MDTM.
mdtmInstant in interface FtpClientrelPath - The relative path of the file object to execute MDTM command againstInstant object containing the MDTM timestamp.IOException - If the underlying FTP client encountered an error.public boolean removeDirectory(String relPath) throws IOException
removeDirectory in interface FtpClientIOExceptionpublic boolean rename(String oldName, String newName) throws IOException
rename in interface FtpClientIOExceptionpublic InputStream retrieveFileStream(String relPath) throws IOException
retrieveFileStream in interface FtpClientIOExceptionpublic InputStream retrieveFileStream(String relPath, int bufferSize) throws IOException
retrieveFileStream in interface FtpClientIOExceptionpublic InputStream retrieveFileStream(String relPath, long restartOffset) throws IOException
retrieveFileStream in interface FtpClientIOExceptionpublic void setBufferSize(int bufferSize)
throws FileSystemException
setBufferSize in interface FtpClientFileSystemExceptionpublic OutputStream storeFileStream(String relPath) throws IOException
storeFileStream in interface FtpClientIOExceptionCopyright © 2002–2020 The Apache Software Foundation. All rights reserved.