info.aduna.platform.desktop.support
Class PosixDesktop
java.lang.Object
info.aduna.platform.desktop.DesktopBase
info.aduna.platform.desktop.support.PosixDesktop
- All Implemented Interfaces:
- Desktop
- Direct Known Subclasses:
- MacOSXDesktop, PosixGnomeDesktop, PosixKDEDesktop
public class PosixDesktop
- extends DesktopBase
Platform implementation for *nix platforms.
|
Method Summary |
protected String |
getDefaultApplication(String resource)
Tries default applications for the given resource, and returns it or
returns null if none was found successfully on the system. |
boolean |
isExecutable(String resource)
Determines whether the specified file is executable. |
int |
openResource(String resource)
Opens the specified resource in the appropriate external application. |
protected int |
openResource(String resource,
boolean forceOpenInApp)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXECUTABLE_EXTENSIONS
public static final String[] EXECUTABLE_EXTENSIONS
- The extensions of executable files
PosixDesktop
public PosixDesktop(Platform platform)
openResource
public int openResource(String resource)
throws UnsupportedOperationException,
IOException
- Description copied from interface:
Desktop
- Opens the specified resource in the appropriate external application. The
resource may have the form of a URL, but this is not required. This
method blocks until the external process that actually opens the resource
completes, and then returns its exit code.
- Returns:
- exit code of the external process
- Throws:
UnsupportedOperationException - when the Platform does not know how to handle the specified
resource.
IOException - when an I/O error occurs.
openResource
protected int openResource(String resource,
boolean forceOpenInApp)
throws UnsupportedOperationException,
IOException
- Throws:
UnsupportedOperationException
IOException
getDefaultApplication
protected String getDefaultApplication(String resource)
- Tries default applications for the given resource, and returns it or
returns null if none was found successfully on the system.
isExecutable
public boolean isExecutable(String resource)
throws IOException
- Determines whether the specified file is executable.
- Throws:
IOException
Copyright © 1997-2008 Aduna. All Rights Reserved.