forked from WilliBoelke/OHDM-offline-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Server Communication
Willi Bölke edited this page Jun 2, 2020
·
8 revisions
The Package ServerCommunication contains all Classens wich directly communicates with the the Server
Wraps the Apache FTPClient to our needs.
| Name | Returns | Parameters | Description | |
|---|---|---|---|---|
| connect() | 0 = success 1 = Server refused connection 2 = SocketException 3 = IOException | connects to the server sepecified in Variables
|
||
| isConnected() |
true = connected false = not connected |
returns if the instannce is connected | ||
| closeConnection() | void | closes the connection | ||
| getDirList(String path) |
FTPFile[] which contains all directories in path
|
the path | Retrieves all directories in path from the FTPServer |
|
| getFileList(String path) |
FTPFile[] which contains all files in path
|
the pah | Retrieves all files in path from the FTPServer |
|
| getAllFilesList(String path) |
FTPFile[] which contains all files in path
|
the path | Retrieves all files in path and includes files from sub dirs |
|
| downloadFile(String remoteFileName, String downloadPath) |
true = success false = not successfull |
remoteFileName = the name of the file to be downloaded, downloadPath = the directory path |
downloads a file from the FTPServer and writes it to the device local storage |
Lists directories hosted on FTP Remote Server.
Lists files hosted on FTP Remote Server
Downloads files from FTP Remote Server
Contains all needed information about the Server such as IP address, ports and (ftp) user ingerdients. You need to chane the in case you host your own Server on a different location.