public interface FileOpenService
FileOpenService
service allows the user to choose a file
from the local file system, even for applications that
are running in the untrusted execution environment. The JNLP Client is the mediator
and is therefore responsible for providing the specific implementation
of this, if any.
This service provides a similar function as the file input field for HTML-based forms.
FileSaveService
,
FileContents
Modifier and Type | Method and Description |
---|---|
FileContents |
openFileDialog(java.lang.String pathHint,
java.lang.String[] extensions)
Asks the user to choose a single file.
|
FileContents[] |
openMultiFileDialog(java.lang.String pathHint,
java.lang.String[] extensions)
Asks the user to choose one or more files.
|
FileContents openFileDialog(java.lang.String pathHint, java.lang.String[] extensions) throws java.io.IOException
FileContents
object.
The returned FileContents
object contains the contents
along with the name of the file. The full path is not returned.pathHint
- A hint from the application to the initial directory for
the file chooser. This might be ignored by the JNLP
Client.extensions
- A list of default extensions to show in the file chooser.
For example, String[] { "txt", "java" }
.
This might be ignored by the JNLP Client.FileContent
object with information about the
chosen file, or null
if the user did not choose a file.java.io.IOException
- if the request failed in any way other than the user did not
choose to select a file.FileContents[] openMultiFileDialog(java.lang.String pathHint, java.lang.String[] extensions) throws java.io.IOException
openFileDialog(java.lang.String, java.lang.String[])
java.io.IOException
Copyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved.