public void dumpIndex() throws IOException {
  boolean atEOF=false;
  byte ixRecord[]=new byte[SHAPE_INDEX_RECORD_LENGTH];
  int recNum=0;
  shx.seek(100);
  while (!atEOF) {
    int result=shx.read(ixRecord,0,SHAPE_INDEX_RECORD_LENGTH);
    if (result == -1) {
      atEOF=true;
      Debug.output("Processed " + recNum + " records");
    }
 else {
      recNum++;
      int offset=readBEInt(ixRecord,0);
      int length=readBEInt(ixRecord,4);
      Debug.output("Record " + recNum + ": "+ offset+ ", "+ length);
    }
  }
}

public void dumpIndex ( ) throws IOException { boolean atEOF = false ; byte ixRecord [ ] = new byte [ SHAPE_INDEX_RECORD_LENGTH ] ; int recNum = 0 ; shx . seek ( 100 ) ; while ( ! atEOF ) { int result = shx . read ( ixRecord , 0 , SHAPE_INDEX_RECORD_LENGTH ) ; if ( result == - 1 ) { atEOF = true ; Debug . output ( "Processed " + recNum + " records" ) ; } else { recNum ++ ; int offset = readBEInt ( ixRecord , 0 ) ; int length = readBEInt ( ixRecord , 4 ) ; Debug . output ( "Record " + recNum + ": " + offset + ", " + length ) ; } } }
displays the contents of this index .
