Package jline.internal
Class Configuration
java.lang.Object
jline.internal.Configuration
Provides access to configuration values.
- Since:
- 2.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
System property which can point to a file or URL containing configuration properties to load.static final String
Default configuration file name loaded from user's home directory.private static Properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static URL
(package private) static String
extractEncodingFromCtype
(String ctype) Parses the LC_CTYPE value to extract the encoding according to the POSIX standard, which says that the LC_CTYPE environment variable may be of the format[language[_territory][.codeset][@modifier]]
static boolean
getBoolean
(String name) static boolean
getBoolean
(String name, boolean defaultValue) static String
Get the default encoding.static String
static int
getInteger
(String name, int defaultValue) static String
static long
static String
static Properties
static String
static String
static File
private static Properties
static boolean
isHpux()
static boolean
private static void
loadProperties
(URL url, Properties props) static void
reset()
-
Field Details
-
JLINE_CONFIGURATION
System property which can point to a file or URL containing configuration properties to load.- Since:
- 2.7
- See Also:
-
JLINE_RC
Default configuration file name loaded from user's home directory.- See Also:
-
properties
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
initProperties
-
loadProperties
- Throws:
IOException
-
determineUrl
-
reset
public static void reset()- Since:
- 2.7
-
getProperties
- Since:
- 2.7
-
getString
-
getString
-
getBoolean
-
getBoolean
-
getInteger
- Since:
- 2.6
-
getLong
- Since:
- 2.6
-
getLineSeparator
- Since:
- 2.7
-
getUserHome
-
getOsName
-
isWindows
public static boolean isWindows()- Since:
- 2.7
-
isHpux
public static boolean isHpux() -
getFileEncoding
-
getEncoding
Get the default encoding. Will first look at the LC_ALL, LC_CTYPE, and LANG environment variables, then the input.encoding system property, then the default charset according to the JVM.- Returns:
- The default encoding to use when none is specified.
-
extractEncodingFromCtype
Parses the LC_CTYPE value to extract the encoding according to the POSIX standard, which says that the LC_CTYPE environment variable may be of the format[language[_territory][.codeset][@modifier]]
- Parameters:
ctype
- The ctype to parse, may be null- Returns:
- The encoding, if one was present, otherwise null
-