Class Configuration
java.lang.Object
jline.internal.Configuration
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property which can point to a file or URL containing configuration properties to load.static final StringDefault 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 StringextractEncodingFromCtype(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 booleangetBoolean(String name) static booleangetBoolean(String name, boolean defaultValue) static StringGet the default encoding.static Stringstatic intgetInteger(String name, int defaultValue) static Stringstatic longstatic Stringstatic Propertiesstatic Stringstatic Stringstatic Fileprivate static Propertiesstatic booleanisHpux()static booleanprivate static voidloadProperties(URL url, Properties props) static voidreset()
-
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
-