public final class EnvironmentUtility extends Object
Modifier and Type | Method and Description |
---|---|
static String |
toAbsolutePathFromEnvironment(String aPath,
String... aEnvHomePropertyNames)
This method converts a relative path to an absolute path relative to the
path specified in the first system property provided being set with a
value.
|
static String |
toAbsoluteUserHomePath(String aPath)
This method converts a relative path to an absolute path relative to the
user's home folder.
|
static String |
toPlatformSpecificPath(String aPath)
This method concerts the given path to a platform specific path, mainly
replacing the path separator accordingly.
|
public static String toAbsoluteUserHomePath(String aPath) throws IllegalStateException
aPath
- The path to be converted to an absolute path in case it was
a relative path.IllegalStateException
- in case the user's home folder is not
defined and a relative path has been provided.public static String toAbsolutePathFromEnvironment(String aPath, String... aEnvHomePropertyNames) throws IllegalArgumentException
aPath
- The path to be converted to an absolute path in case it was
a relative path.aEnvHomePropertyNames
- The names of the system properties which's
value is to be used in order to resolve the path.IllegalArgumentException
- in case the system property name is not
defined or is empty and a relative path has been provided.Copyright © 2016. All rights reserved.