public class SystemUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
SystemUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
getCommandLineOptions(String[] args,
String[][] opts)
Returns a Map of all options in the command line.
|
static Charset |
getDefaultEncoding(MuleContext muleContext) |
static Map |
getenv()
Get the operating system environment variables.
|
static String |
getenv(String name) |
static boolean |
isAppleJDK() |
static boolean |
isIbmJDK() |
static boolean |
isSunJDK() |
static Map<String,String> |
parsePropertyDefinitions(String input)
Returns a Map of all valid property definitions in
-Dkey=value format. |
public static Map getenv()
public static boolean isSunJDK()
public static boolean isAppleJDK()
public static boolean isIbmJDK()
public static Map<String,Object> getCommandLineOptions(String[] args, String[][] opts) throws DefaultMuleException
DefaultMuleExceptionpublic static Map<String,String> parsePropertyDefinitions(String input)
-Dkey=value format. -Dkey is interpreted as
-Dkey=true, everything else is ignored. Whitespace in values is properly handled but needs to be quoted
properly: -Dkey="some value".input - String with property definitionnMap of property String keys with their defined values (Strings). If no valid key-value pairs can be parsed,
the map is empty.public static Charset getDefaultEncoding(MuleContext muleContext)
muleContext -> MuleConfiguration.getDefaultEncoding()Charset.defaultCharset()Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.