Package org.hl7.fhir.utilities
Class FTPClient
java.lang.Object
org.hl7.fhir.utilities.FTPClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()Connect to the server, throw an exception if it failsprotected voidcreateRemotePathIfNotExists(String filePath) Takes a file path and creates all intermediate directories if they do not yet exist.voidDelete a file on the FTP servervoidintstatic voidprotected booleanremotePathExists(String path) voidsetBufferSize(int bufferSize) voidUpload a file from the local system to the FTP Server
-
Constructor Details
-
FTPClient
Connect to an FTP server- Parameters:
server- - the server to connect to (usually just an IP address). It's up to the system to figure out access (VPN etc)path- - the path on the FTP server to treat all the operations as relative touser- - username for the FTP serverpassword- - password for the FTP server
-
FTPClient
-
-
Method Details
-
connect
Connect to the server, throw an exception if it fails- Throws:
IOException
-
setBufferSize
-
getBufferSize
-
delete
Delete a file on the FTP server- Parameters:
path- - relative to the path provided in the constructor- Throws:
IOException
-
createRemotePathIfNotExists
Takes a file path and creates all intermediate directories if they do not yet exist.- Parameters:
filePath- relative to the path provided in the constructor and including the file name- Throws:
IOException
-
remotePathExists
- Throws:
IOException
-
upload
Upload a file from the local system to the FTP Server- Parameters:
source- - absolute path on local systempath- - relative to the path provided in the constructor- Throws:
IOException
-
disconnect
- Throws:
IOException
-
main
- Throws:
IOExceptionFHIRException
-