Package io.github.astrapi69.file.system
Class SystemPropertiesExtensions
- java.lang.Object
-
- io.github.astrapi69.file.system.SystemPropertiesExtensions
-
public class SystemPropertiesExtensions extends java.lang.Object
The classSystemPropertiesExtensions
provide methods for get the common system properties
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FILE_SEPARATOR_PROPERTY_KEY
static java.lang.String
JAVA_CLASS_PATH_PROPERTY_KEY
static java.lang.String
JAVA_HOME_PROPERTY_KEY
static java.lang.String
JAVA_IO_TMPDIR_PROPERTY_KEY
static java.lang.String
JAVA_VENDOR_PROPERTY_KEY
static java.lang.String
JAVA_VENDOR_URL_PROPERTY_KEY
static java.lang.String
JAVA_VERSION_PROPERTY_KEY
static java.lang.String
LINE_SEPARATOR_PROPERTY_KEY
static java.lang.String
OS_ARCH_PROPERTY_KEY
static java.lang.String
OS_NAME_PROPERTY_KEY
static java.lang.String
OS_VERSION_PROPERTY_KEY
static java.lang.String
PATH_SEPARATOR_PROPERTY_KEY
static java.lang.String
USER_DIR_PROPERTY_KEY
static java.lang.String
USER_HOME_PROPERTY_KEY
static java.lang.String
USER_NAME_PROPERTY_KEY
-
Constructor Summary
Constructors Constructor Description SystemPropertiesExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getFileSeparator()
Gets the system file separator character.static java.lang.String
getJavaClassPath()
Gets the Path used to find directories and JAR archives containing class files.static java.lang.String
getJavaHome()
Gets the path of the installed java homestatic java.lang.String
getJavaIoTmpdir()
Gets the path for the temporary directory for javastatic java.lang.String
getJavaVendor()
Gets the name of JRE vendor namestatic java.lang.String
getJavaVendorUrl()
Gets the name of JRE vendor urlstatic java.lang.String
getJavaVersion()
Gets the JRE versionstatic java.lang.String
getLineSeparator()
Gets the system line separator character.static java.lang.String
getOsArchitecture()
Gets the operating system architecturestatic java.lang.String
getOsName()
Gets the operating system namestatic java.lang.String
getOsVersion()
Gets the operating system versionstatic java.lang.String
getPathSeparator()
Gets the system path separator character used in java.class.pathstatic java.lang.String
getUserHome()
Gets the user home directorystatic java.lang.String
getUserName()
Gets the user namestatic java.lang.String
getUserWorkingDirectory()
Gets the user working directory
-
-
-
Field Detail
-
OS_ARCH_PROPERTY_KEY
public static final java.lang.String OS_ARCH_PROPERTY_KEY
- See Also:
- Constant Field Values
-
OS_NAME_PROPERTY_KEY
public static final java.lang.String OS_NAME_PROPERTY_KEY
- See Also:
- Constant Field Values
-
OS_VERSION_PROPERTY_KEY
public static final java.lang.String OS_VERSION_PROPERTY_KEY
- See Also:
- Constant Field Values
-
USER_HOME_PROPERTY_KEY
public static final java.lang.String USER_HOME_PROPERTY_KEY
- See Also:
- Constant Field Values
-
USER_NAME_PROPERTY_KEY
public static final java.lang.String USER_NAME_PROPERTY_KEY
- See Also:
- Constant Field Values
-
USER_DIR_PROPERTY_KEY
public static final java.lang.String USER_DIR_PROPERTY_KEY
- See Also:
- Constant Field Values
-
FILE_SEPARATOR_PROPERTY_KEY
public static final java.lang.String FILE_SEPARATOR_PROPERTY_KEY
- See Also:
- Constant Field Values
-
LINE_SEPARATOR_PROPERTY_KEY
public static final java.lang.String LINE_SEPARATOR_PROPERTY_KEY
- See Also:
- Constant Field Values
-
PATH_SEPARATOR_PROPERTY_KEY
public static final java.lang.String PATH_SEPARATOR_PROPERTY_KEY
- See Also:
- Constant Field Values
-
JAVA_IO_TMPDIR_PROPERTY_KEY
public static final java.lang.String JAVA_IO_TMPDIR_PROPERTY_KEY
- See Also:
- Constant Field Values
-
JAVA_CLASS_PATH_PROPERTY_KEY
public static final java.lang.String JAVA_CLASS_PATH_PROPERTY_KEY
- See Also:
- Constant Field Values
-
JAVA_VENDOR_PROPERTY_KEY
public static final java.lang.String JAVA_VENDOR_PROPERTY_KEY
- See Also:
- Constant Field Values
-
JAVA_HOME_PROPERTY_KEY
public static final java.lang.String JAVA_HOME_PROPERTY_KEY
- See Also:
- Constant Field Values
-
JAVA_VERSION_PROPERTY_KEY
public static final java.lang.String JAVA_VERSION_PROPERTY_KEY
- See Also:
- Constant Field Values
-
JAVA_VENDOR_URL_PROPERTY_KEY
public static final java.lang.String JAVA_VENDOR_URL_PROPERTY_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFileSeparator
public static java.lang.String getFileSeparator()
Gets the system file separator character. In other words the character that separates components of a file path. This is "/" on UNIX and "\" on Windows.- Returns:
- the system file separator character
-
getJavaIoTmpdir
public static java.lang.String getJavaIoTmpdir()
Gets the path for the temporary directory for java- Returns:
- the java class path
-
getJavaHome
public static java.lang.String getJavaHome()
Gets the path of the installed java home- Returns:
- the java home path
-
getJavaClassPath
public static java.lang.String getJavaClassPath()
Gets the Path used to find directories and JAR archives containing class files. Elements of the class path are separated by a platform-specific character specified in the path.separator property.- Returns:
- the java class path
-
getJavaVendor
public static java.lang.String getJavaVendor()
Gets the name of JRE vendor name- Returns:
- the name of JRE vendor name
-
getJavaVendorUrl
public static java.lang.String getJavaVendorUrl()
Gets the name of JRE vendor url- Returns:
- the name of JRE vendor url
-
getJavaVersion
public static java.lang.String getJavaVersion()
Gets the JRE version- Returns:
- the JRE version
-
getLineSeparator
public static java.lang.String getLineSeparator()
Gets the system line separator character. In other words the sequence used by operating system to separate lines in text files- Returns:
- the system line separator character
-
getOsArchitecture
public static java.lang.String getOsArchitecture()
Gets the operating system architecture- Returns:
- the operating system architecture
-
getOsName
public static java.lang.String getOsName()
Gets the operating system name- Returns:
- the operating system name
-
getOsVersion
public static java.lang.String getOsVersion()
Gets the operating system version- Returns:
- the operating system version
-
getPathSeparator
public static java.lang.String getPathSeparator()
Gets the system path separator character used in java.class.path- Returns:
- the system path separator character used in java.class.path
-
getUserHome
public static java.lang.String getUserHome()
Gets the user home directory- Returns:
- the user home directory
-
getUserName
public static java.lang.String getUserName()
Gets the user name- Returns:
- the user name
-
getUserWorkingDirectory
public static java.lang.String getUserWorkingDirectory()
Gets the user working directory- Returns:
- the user working directory
-
-