Code example for Properties

Methods: load

0
    public static final String JLINE_RC = ".jline.rc";
 
    private static final Properties userprops;
 
    static { 
        Properties props = new Properties();
 
        File file = new File(getUserHome(), JLINE_RC);
        if (file.exists() && file.canRead()) {
            try { 
                InputStream input = new BufferedInputStream(new FileInputStream(file));
                try { 
                    props.load(input);
                    Log.debug("Loaded user configuration: ", file);
                } 
                finally { 
                    input.close();
                } 
            } 
            catch (IOException e) {
                Log.warn("Unable to read user configuration: ", file, e);