Class LocalFilesystem
java.lang.Object
org.progettoedids.util.filehandlers.LocalFilesystem
- All Implemented Interfaces:
FileDownloader,FileUploader
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LocalFilesystem
public LocalFilesystem()
-
-
Method Details
-
download
Description copied from interface:FileDownloaderRetrieves a file from the location specified in the URI and returns it as a String.- Specified by:
downloadin interfaceFileDownloader- Parameters:
uri- A URI. Must not be null- Returns:
- a String with the contents of the file
- Throws:
IOException- if any issue occurs during the retrieval of the file
-
upload
Description copied from interface:FileUploaderUploads a String to file at a location specified by the URI.- Specified by:
uploadin interfaceFileUploader- Parameters:
uri- A URI that points to the location where to upload the file. Must not be nullupload- A String to upload as a file. Must not be null- Throws:
IOException- if any error occurs during the upload
-