public E read ( ) throws IOException { boolean status = false ; try { // Read header if not already read readHeader ( ) ; // Read the records E element ; try { do { element = readRecord ( this . nextExpectedRecordIndex ) ; if ( ! postRecordReadingStage ( element ) ) { element = null ; } ++ this . nextExpectedRecordIndex ; } while ( element == null ) ; } catch ( EOFException e ) { element = null ; close ( ) ; postReadingStage ( true ) ; } status = true ; return element ; } finally { if ( this . taskProgression != null ) { this . taskProgression . setValue ( this . buffer . position ( ) + HEADER_BYTES ) ; } if ( ! status ) { close ( ) ; postReadingStage ( status ) ; } } }
Read the elements for a shape file .