/* * Returns the number of rows in the file. <i>Side effect:</i> Moves the row pointer to the first row */ @Override public int getTotalRows() throws DataAccessObjectException { if (totalRows == 0) { if (!isOpen) { throw new IllegalStateException("File is not open"); } totalRows = DAORowUtil.calculateTotalRows(this); } return totalRows; }