question: protected void indexNulls ( InputStream is , long ptr , List < Entry > entries ) { boolean moreRecords = true ; byte rHdr [ ] = new byte [ SHAPE_RECORD_HEADER_LENGTH ] ; int result ; int nRecords = 0 ; int recLengthWords , recLengthBytes ; long recOffset ; int recBufSize = 20 ; byte recBuf [ ] = new byte [ recBufSize ] ; double x ; double y ; try { while ( moreRecords ) { result = is . read ( rHdr , 0 , SHAPE_RECORD_HEADER_LENGTH ) ; if ( result < 0 ) { moreRecords = false ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "Found " + nRecords + " records" ) ; logger . fine ( "recBufSize = " + recBufSize ) ; } } else { nRecords ++ ; recOffset = ptr ; readBEInt ( rHdr , 0 ) ; recLengthWords = readBEInt ( rHdr , 4 ) ; recLengthBytes = recLengthWords * 2 ; if ( recLengthBytes > recBufSize ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "Shapefile SpatialIndex increasing recBufSize to " + recLengthBytes ) ; } recBufSize = recLengthBytes ; recBuf = new byte [ recBufSize ] ; } result = is . read ( recBuf , 0 , recLengthBytes ) ; x = 0 ; y = 0 ; ptr += recLengthBytes + 8 ; Entry entry = new Entry ( x , y , x , y , ( int ) recOffset ) ; entries . add ( entry ) ; } } } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } finally { try { is . close ( ) ; } catch ( java . io . IOException e ) { } } }
target:  Writes the spatial index for a null shape file.