public float getProgress ( ) throws IOException { if ( ! _rows . hasNext ( ) ) { return 1 ; } else if ( _rowsRead < _approximateSize ) { return ( float ) _rowsRead / _approximateSize ; } else { // We've already read the expected number of rows. return ( ( float ) ( _approximateSize - 1 ) + 0.5f ) / _approximateSize ; } }
Returns a rough approximate of the progress on a scale from 0 to 1