Class Host


  • public class Host
    extends java.lang.Object
    Host contains static methods that return information that varies from one host operating system to another.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFileName​(java.lang.String pathName)
      Get the host specific form of a file name suitable for a file dialog.
      static java.lang.String getPrefDir()
      Get the host specific preferences directory.
      static boolean isLinux()  
      static boolean isMacosx()  
      static boolean isWindows()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPrefDir

        public static java.lang.String getPrefDir()
        Get the host specific preferences directory. On Mac OS X, this is ~/Library/Preferences/. On other host systems, it is the empty string.
        Returns:
        The empty string or the Mac OS X preferences directory with trailing '/'.
      • getFileName

        public static java.lang.String getFileName​(java.lang.String pathName)
        Get the host specific form of a file name suitable for a file dialog. On Mac OS X, this is just the file name portion of the path name. On other systems, it is the unchanged path name.
        Parameters:
        pathName - The full path name of a file.
        Returns:
        The full path name or the file name for Mac OS X
      • isLinux

        public static boolean isLinux()
      • isMacosx

        public static boolean isMacosx()
      • isWindows

        public static boolean isWindows()