of-commons-io/src/main/java/org/openforis/commons/io/csv/OpenCsvReader.java
/**
	 * Returns the number of lines including the headers
	 * 
	 * @return
	 * @throws IOException
	 */
Returns the number of lines including the headers


Returns the number of lines including the headers
public int size() throws IOException {
		if (this.file == null) {
			throw new IllegalStateException("Source file not properly initialized");
		}
		LineNumberReader lineReader = null;
		try {
			lineReader = new LineNumberReader(new FileReader(this.file));
			lineReader.skip(Long.MAX_VALUE);
			return lineReader.getLineNumber();
		} catch (IOException e) {
			throw e;
		} finally {
			lineReader.close();
		}
	}
public int size ( ) throws IOException { if ( this . file == null ) { throw new IllegalStateException ( "Source file not properly initialized" ) ; } LineNumberReader lineReader = null ; try { lineReader = new LineNumberReader ( new FileReader ( this . file ) ) ; lineReader . skip ( Long . MAX_VALUE ) ; return lineReader . getLineNumber ( ) ; } catch ( IOException e ) { throw e ; } finally { lineReader . close ( ) ; } }
Returns the number of lines including the headers
Returns the number of lines including the headers