Package org.apache.ofbiz.content.ftp
Interface FtpClientInterface
-
- All Known Implementing Classes:
SecureFtpClient
,SimpleFtpClient
,SshFtpClient
public interface FtpClientInterface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeConnection()
Close opened connectionvoid
connect(java.lang.String hostname, java.lang.String username, java.lang.String password, java.lang.Long port, java.lang.Long timeout)
Initialization of a file transfer client, and connection to the given servervoid
copy(java.lang.String path, java.lang.String fileName, java.io.InputStream file)
Copy of the give file to the connected server into the path.java.util.List<java.lang.String>
list(java.lang.String path)
void
setBinaryTransfer(boolean isBinary)
void
setPassiveMode(boolean isPassive)
-
-
-
Method Detail
-
connect
void connect(java.lang.String hostname, java.lang.String username, java.lang.String password, java.lang.Long port, java.lang.Long timeout) throws java.io.IOException, GeneralException
Initialization of a file transfer client, and connection to the given server- Parameters:
hostname
- hostname to connect tousername
- username to login withpassword
- password to login withport
- port to connect to the server, optionaltimeout
- timeout for connection process, optional- Throws:
java.io.IOException
GeneralException
-
copy
void copy(java.lang.String path, java.lang.String fileName, java.io.InputStream file) throws java.io.IOException
Copy of the give file to the connected server into the path.- Parameters:
path
- path to copy the file tofileName
- name of the copied filefile
- data to copy- Throws:
java.io.IOException
-
list
java.util.List<java.lang.String> list(java.lang.String path) throws java.io.IOException
- Throws:
java.io.IOException
-
setBinaryTransfer
void setBinaryTransfer(boolean isBinary) throws java.io.IOException
- Throws:
java.io.IOException
-
setPassiveMode
void setPassiveMode(boolean isPassive) throws java.io.IOException
- Throws:
java.io.IOException
-
closeConnection
void closeConnection() throws java.io.IOException
Close opened connection- Throws:
java.io.IOException
-
-