Code example for LineNumberReader

Methods: getLineNumberskip

0
	 * @return 
	 * @throws IOException 
	 */ 
	public static int getNumberOfLines(File inFile) throws IOException
	{ 
		LineNumberReader lnr = new LineNumberReader(new InputStreamReader(new FileInputStream(inFile),
				Charset.forName("UTF-8")));
		try 
		{ 
			lnr.skip(Long.MAX_VALUE);
			return lnr.getLineNumber() + 1;
		} 
		finally 
		{ 
			IOUtils.closeQuietly(lnr);
		} 
	} 
 
	/** 
	 * Find out if the source file ends with a newline character. Useful in