Code example for LineNumberReader

Methods: readLine

0
    } 
 
    private int readVersion(File versionFile) throws IOException {
        FileReader input = new FileReader(versionFile);
        try { 
            LineNumberReader lineInput = new LineNumberReader(input);
            String version = lineInput.readLine();
            if (version != null) {
                version = version.trim();
                return Integer.parseInt(version);
            } 
 
            return 0; 
        } catch (Exception e) {
        	return UNVERSIONED;
        } finally { 
            if (input != null) {
                input.close();
            } 
        } 
    }