Code example for LineNumberReader

Methods: getLineNumber

0
	private void throwError(String errMsg, Throwable cause) {
		String lineInfo = " [" + _curFile.toString() + ":";
		if (_reader == null)
			lineInfo += "<unknown>]";
		else 
			lineInfo += _reader.getLineNumber() + "]";
		throw new ParserError(errMsg + lineInfo, cause);
	} 
 
	/** 
	 * Reads next line from the reader. Keeps track of the estimated bytes read 
	 * so far. It is only an estimate because we have no idea what the real line 
	 * terminator was in the file (\n or \r\n). This function will return null 
	 * and set _gotEOF on end of file. 
	 */ 
	private String getNextLine() {
		String line = null;
 
		try { 
			line = _reader.readLine();
		} catch (IOException e) {