Package storage
Class FileLoaderWriter
java.lang.Object
storage.FileLoaderWriter
- All Implemented Interfaces:
Storage
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
FileLoaderWriter
public FileLoaderWriter()
-
-
Method Details
-
readFile
Allows the user to choose media to be added to the Page- Specified by:
readFile
in interfaceStorage
- Parameters:
extensions
- file extensions accepted by the file chooserdescription
- text to be displayed in the file chooser- Returns:
- A map of the name of the read file to the raw bytes stored by it
- Throws:
Exception
- when an error occurs reading the file
-
writeFile
Writes a temp file for use by FileMedia- Specified by:
writeFile
in interfaceStorage
- Parameters:
name
- what the temp file will be calledData
- the raw data to be writtenextension
- the extension type the written temp file will be. Must be in form '.extensionType'- Returns:
- a URI indentfying the temp file that was written
- Throws:
Exception
- when writing fails for any reason
-