de.willuhn.jameica.system
Class Platform

java.lang.Object
  extended by de.willuhn.jameica.system.Platform
Direct Known Subclasses:
PlatformMacOS

public class Platform
extends java.lang.Object

Hilfsklasse, um Plattform-/OS-spezfisches Verhalten zu behandeln.


Field Summary
static int OS_LINUX
          Konstante fuer: Linux.
static int OS_LINUX_64
          Konstante fuer: Linux 64Bit
static int OS_MAC
          Konstante fuer: Mac OS.
static int OS_UNKNOWN
          Konstante fuer: Betriebssystem unbekannt.
static int OS_WINDOWS
          Konstante fuer: Windows.
static int OS_WINDOWS_64
          Konstante fuer: Windows 64Bit.
protected  java.io.File workdir
           
 
Constructor Summary
Platform()
           
 
Method Summary
static Platform getInstance()
          Liefert eine plattform-spezifische Instanz.
 int getOS()
          Liefert das Betriebssystem.
 java.io.File getWorkdir()
          Liefert das Benutzerverzeichnis, in dem Jameica alle Daten speichert.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_UNKNOWN

public static final int OS_UNKNOWN
Konstante fuer: Betriebssystem unbekannt.

See Also:
Constant Field Values

OS_LINUX

public static final int OS_LINUX
Konstante fuer: Linux.

See Also:
Constant Field Values

OS_WINDOWS

public static final int OS_WINDOWS
Konstante fuer: Windows.

See Also:
Constant Field Values

OS_MAC

public static final int OS_MAC
Konstante fuer: Mac OS.

See Also:
Constant Field Values

OS_LINUX_64

public static final int OS_LINUX_64
Konstante fuer: Linux 64Bit

See Also:
Constant Field Values

OS_WINDOWS_64

public static final int OS_WINDOWS_64
Konstante fuer: Windows 64Bit.

See Also:
Constant Field Values

workdir

protected java.io.File workdir
Constructor Detail

Platform

public Platform()
Method Detail

getInstance

public static final Platform getInstance()
Liefert eine plattform-spezifische Instanz.

Returns:
Instanz.

getWorkdir

public java.io.File getWorkdir()
                        throws java.lang.Exception
Liefert das Benutzerverzeichnis, in dem Jameica alle Daten speichert. Falls es noch nicht existiert, wird es automatisch angelegt.

Returns:
Benutzerverzeichnis.
Throws:
java.lang.Exception - wenn das Benutzerverzeichnis nicht lesbar ist oder nicht erstellt werden konnte.

getOS

public int getOS()
Liefert das Betriebssystem. Siehe dazu die Konstanten OS_*.

Returns:
Betriebssystem.