int count = 0;
    public void dumpIndex() throws IOException {        boolean atEOF = false;        byte ixRecord[] = new byte[SHAPE_INDEX_RECORD_LENGTH];        int recNum = 0;        int count = 0;        shx.seek(100); // skip the file header        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);            }        }    }