public Geometry geomAt ( int offset ) throws IOException { // need to update position buffer . position ( offset ) ; // record header buffer . skip ( 8 ) ; // shape record is all little endian buffer . order ( ByteOrder . LITTLE_ENDIAN ) ; // read the type, handlers don't need it ShapeType recordType = ShapeType . forID ( buffer . getInt ( ) ) ; // this usually happens if the handler logic is bunk, // but bad files could exist as well... if ( recordType != ShapeType . NULL && recordType != fileShapeType ) { throw new IllegalStateException ( "ShapeType changed illegally from " + fileShapeType + " to " + recordType ) ; } return handler . read ( buffer , recordType ) ; }
Fetch the next record information .