Class OS

java.lang.Object
nz.ac.waikato.cms.core.OS

public class OS extends Object
Helper class for operating system related stuff.
Version:
$Revision: 10557 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static Boolean
    whether the OS is Android.
    protected static Boolean
    whether the OS is Linux.
    protected static Boolean
    whether the OS is Mac.
    protected static Boolean
    whether the OS is Windows.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OS()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    Returns the "bitness", ie 32 or 64 bit of the underlying OS.
    static boolean
    Checks whether the operating system is Android.
    static boolean
    Checks whether the operating system is Linux (but not Android).
    static boolean
    Checks whether the operating system is Windows.
    static boolean
    Checks whether the operating system is Windows.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_IsWindows

      protected static Boolean m_IsWindows
      whether the OS is Windows.
    • m_IsMac

      protected static Boolean m_IsMac
      whether the OS is Mac.
    • m_IsLinux

      protected static Boolean m_IsLinux
      whether the OS is Linux.
    • m_IsAndroid

      protected static Boolean m_IsAndroid
      whether the OS is Android.
  • Constructor Details

    • OS

      public OS()
  • Method Details

    • isWindows

      public static boolean isWindows()
      Checks whether the operating system is Windows.
      Returns:
      true if the OS is Windows flavor
    • isMac

      public static boolean isMac()
      Checks whether the operating system is Windows.
      Returns:
      true if the OS is Windows flavor
    • isLinux

      public static boolean isLinux()
      Checks whether the operating system is Linux (but not Android).
      Returns:
      true if the OS is Linux flavor (but not Android)
    • isAndroid

      public static boolean isAndroid()
      Checks whether the operating system is Android.
      Returns:
      true if the OS is Android flavor
    • getBitness

      public static int getBitness()
      Returns the "bitness", ie 32 or 64 bit of the underlying OS.
      Returns:
      the number of bits