Package net.sourceforge.jnlp.services
Class XFileSaveService
- java.lang.Object
-
- net.sourceforge.jnlp.services.XFileSaveService
-
- All Implemented Interfaces:
FileSaveService
class XFileSaveService extends java.lang.Object implements FileSaveService
The FileSaveService JNLP service.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXFileSaveService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileContentssaveAsFileDialog(java.lang.String pathHint, java.lang.String[] extensions, FileContents contents)Prompts the user to save a file, with an optional pre-set filename.FileContentssaveFileDialog(java.lang.String pathHint, java.lang.String[] extensions, java.io.InputStream stream, java.lang.String name)Prompts the user to save a file.private voidwriteToFile(java.io.InputStream stream, java.io.File file)Writes actual file to disk.
-
-
-
Method Detail
-
saveFileDialog
public FileContents saveFileDialog(java.lang.String pathHint, java.lang.String[] extensions, java.io.InputStream stream, java.lang.String name) throws java.io.IOException
Prompts the user to save a file.- Specified by:
saveFileDialogin interfaceFileSaveService- Throws:
java.io.IOException
-
saveAsFileDialog
public FileContents saveAsFileDialog(java.lang.String pathHint, java.lang.String[] extensions, FileContents contents) throws java.io.IOException
Prompts the user to save a file, with an optional pre-set filename.- Specified by:
saveAsFileDialogin interfaceFileSaveService- Throws:
java.io.IOException
-
writeToFile
private void writeToFile(java.io.InputStream stream, java.io.File file) throws java.io.IOExceptionWrites actual file to disk.- Throws:
java.io.IOException
-
-