Class OSUtils


  • public class OSUtils
    extends java.lang.Object
    A set of helper utilities for determining the operating system, host name, and dealing with relative file paths
    Author:
    Ben Holland
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OSUtils.ResourceUtils
      A class for getting relative file paths Source modified from original version at http://stackoverflow.com/questions/204784/how-to-construct-a-relative-path-in-java-from-two-absolute-paths-or-urls
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getOsName()  
      static java.lang.String getSystemName()  
      static boolean isMac()  
      static boolean isUnix()  
      static boolean isWindows()  
      • Methods inherited from class java.lang.Object

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

      • getOsName

        public static java.lang.String getOsName()
      • isWindows

        public static boolean isWindows()
      • isMac

        public static boolean isMac()
      • isUnix

        public static boolean isUnix()
      • getSystemName

        public static java.lang.String getSystemName()
                                              throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException