private void readHeader() throws IOException {
int schemaByteSize = indexIn.readInt();
byte [] schemaBytes = new byte[schemaByteSize];
StorageUtil.readFully(indexIn, schemaBytes, 0, schemaByteSize);
SchemaProto.Builder builder = SchemaProto.newBuilder();
builder.mergeFrom(schemaBytes);
SchemaProto proto = builder.build();
this.keySchema = new Schema(proto);
this.rowStoreDecoder = RowStoreUtil.createDecoder(keySchema);
int compByteSize = indexIn.readInt();
byte [] compBytes = new byte[compByteSize];
StorageUtil.readFully(indexIn, compBytes, 0, compByteSize);
TupleComparatorProto.Builder compProto = TupleComparatorProto.newBuilder();
compProto.mergeFrom(compBytes);
this.comparator = new TupleComparator(compProto.build());
this.level = indexIn.readInt();
this.entryNum = indexIn.readInt();
if (entryNum > 0) {
byte [] minBytes = new byte[indexIn.readInt()];
StorageUtil.readFully(indexIn, minBytes, 0, minBytes.length);
this.firstKey = rowStoreDecoder.toTuple(minBytes);
byte [] maxBytes = new byte[indexIn.readInt()];
StorageUtil.readFully(indexIn, maxBytes, 0, maxBytes.length);
this.lastKey = rowStoreDecoder.toTuple(maxBytes);
}
}