Collections.sort(_indexes);   _buffer.position(idxOffset); for (int i = 0; i < _indexCount; i++) { _buffer.getInt(); ((Index) _indexes.get(i)).read(_buffer, _columns); }   _buffer.position(idxEndOffset);
  private void readPage() throws IOException, SQLException {    if (LOG.isDebugEnabled()) {      _buffer.rewind();      LOG.debug("Table def block:\n" + ByteUtil.toHexString(_buffer,          _format.SIZE_TDEF_BLOCK));    }    _rowCount = _buffer.getInt(_format.OFFSET_NUM_ROWS);    _tableType = _buffer.get(_format.OFFSET_TABLE_TYPE);    _columnCount = _buffer.getShort(_format.OFFSET_NUM_COLS);    _indexCount = _buffer.getInt(_format.OFFSET_NUM_INDEXES);        byte rowNum = _buffer.get(_format.OFFSET_OWNED_PAGES);    int pageNum = ByteUtil.get3ByteInt(_buffer, _format.OFFSET_OWNED_PAGES + 1);    _ownedPages = UsageMap.read(_pageChannel, pageNum, rowNum, _format);    rowNum = _buffer.get(_format.OFFSET_FREE_SPACE_PAGES);    pageNum = ByteUtil.get3ByteInt(_buffer, _format.OFFSET_FREE_SPACE_PAGES + 1);    _freeSpacePages = UsageMap.read(_pageChannel, pageNum, rowNum, _format);        for (int i = 0; i < _indexCount; i++) {      Index index = new Index(_tableDefPageNumber, _pageChannel, _format);      _indexes.add(index);      index.setRowCount(_buffer.getInt(_format.OFFSET_INDEX_DEF_BLOCK +          i * _format.SIZE_INDEX_DEFINITION + 4));    }        int offset = _format.OFFSET_INDEX_DEF_BLOCK +        _indexCount * _format.SIZE_INDEX_DEFINITION;    Column column;    for (int i = 0; i < _columnCount; i++) {      column = new Column(_buffer,          offset + i * _format.SIZE_COLUMN_HEADER, _pageChannel, _format);      _columns.add(column);    }    offset += _columnCount * _format.SIZE_COLUMN_HEADER;    for (int i = 0; i < _columnCount; i++) {      column = (Column) _columns.get(i);      short nameLength = _buffer.getShort(offset);      offset += 2;      byte[] nameBytes = new byte[nameLength];      _buffer.position(offset);      _buffer.get(nameBytes, 0, (int) nameLength);      column.setName(_format.CHARSET.decode(ByteBuffer.wrap(nameBytes)).toString());      offset += nameLength;    }    Collections.sort(_columns);        for (int i = 0; i < _indexCount; i++) {      _buffer.getInt(); //Forward past Unknown      ((Index) _indexes.get(i)).read(_buffer, _columns);    }    for (int i = 0; i < _indexCount; i++) {      _buffer.getInt(); //Forward past Unknown      ((Index) _indexes.get(i)).setIndexNumber(_buffer.getInt());      _buffer.position(_buffer.position() + 20);    }    Collections.sort(_indexes);    for (int i = 0; i < _indexCount; i++) {      byte[] nameBytes = new byte[_buffer.getShort()];      _buffer.get(nameBytes);      ((Index) _indexes.get(i)).setName(_format.CHARSET.decode(ByteBuffer.wrap(          nameBytes)).toString());    }      }