Class SystemPropertyUtil

java.lang.Object
org.qiunet.utils.system.SystemPropertyUtil

public final class SystemPropertyUtil extends Object
A collection of utility methods to retrieve and parse the values of the Java system properties.
  • Method Details

    • get

      public static String get(String key)
      从环境变量获得数据
      Parameters:
      key -
      Returns:
    • get

      public static String get(String key, String defaultVal)
      从环境变量获得数据 没有. 则使用默认值.
      Parameters:
      key -
      defaultVal -
      Returns:
    • getUserHome

      public static String getUserHome()
      get user.home
      Returns:
    • getUserDir

      public static String getUserDir()
      get user.dir
      Returns:
    • getOsName

      public static SystemPropertyUtil.OSType getOsName()
      get operation system name
      Returns:
    • getPathSeparator

      public static String getPathSeparator()
    • getFileSeparator

      public static String getFileSeparator()
    • getLineSeparator

      public static String getLineSeparator()