public interface DesktopService
Modifier and Type | Method and Description |
---|---|
void |
browse(java.net.URI uri)
Launches the default browser to display a URI.
|
void |
edit(java.io.File file)
Launches the associated editor application and opens a file for editing.
|
void |
open(java.io.File file)
Launches the associated application to open the file.
|
void |
print(java.io.File file)
Prints a file with the native desktop printing facility, using the
associated application's print command.
|
void open(java.io.File file) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException, java.io.IOException, java.lang.SecurityException
file
- the file to be openedjava.lang.NullPointerException
- if file is nulljava.lang.IllegalArgumentException
- if the specified file dosen't existjava.lang.UnsupportedOperationException
- if the current platform does not
support the Desktop.Action.OPEN actionjava.io.IOException
- if the specified file has no associated application
or the associated application fails to be launchedjava.lang.SecurityException
- if a security manager exists and its
SecurityManager.checkRead(java.lang.String) method denies read access to
the file, or it denies the AWTPermission("showWindowWithoutWarningBanner")
permission, or the calling thread is not allowed to create a subprocessvoid print(java.io.File file) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException, java.io.IOException, java.lang.SecurityException
file
- the file to be openedjava.lang.NullPointerException
- if file is nulljava.lang.IllegalArgumentException
- if the specified file dosen't existjava.lang.UnsupportedOperationException
- if the current platform does not
support the Desktop.Action.OPEN actionjava.io.IOException
- if the specified file has no associated application
or the associated application fails to be launchedjava.lang.SecurityException
- if a security manager exists and its
SecurityManager.checkRead(java.lang.String) method denies read access to
the file, or it denies the AWTPermission("showWindowWithoutWarningBanner")
permission, or the calling thread is not allowed to create a subprocessvoid edit(java.io.File file) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException, java.io.IOException, java.lang.SecurityException
file
- the file to open for editingjava.lang.NullPointerException
- if file is nulljava.lang.IllegalArgumentException
- if the specified file dosen't existjava.lang.UnsupportedOperationException
- if the current platform does not
support the Desktop.Action.OPEN actionjava.io.IOException
- if the specified file has no associated application
or the associated application fails to be launchedjava.lang.SecurityException
- if a security manager exists and its
SecurityManager.checkRead(java.lang.String) method denies read access to
the file, or it denies the AWTPermission("showWindowWithoutWarningBanner")
permission, or the calling thread is not allowed to create a subprocessvoid browse(java.net.URI uri) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException, java.io.IOException, java.lang.SecurityException
uri
- the URI to be displayed in the user default browserjava.lang.NullPointerException
- if file is nulljava.lang.IllegalArgumentException
- if the specified file dosen't existjava.lang.UnsupportedOperationException
- if the current platform does not
support the Desktop.Action.OPEN actionjava.io.IOException
- if the specified file has no associated application
or the associated application fails to be launchedjava.lang.SecurityException
- if a security manager exists and its
SecurityManager.checkRead(java.lang.String) method denies read access to
the file, or it denies the AWTPermission("showWindowWithoutWarningBanner")
permission, or the calling thread is not allowed to create a subprocess
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.