text: public static int checkHeaderNoMagic(DataInput in, String codec, int minVersion, int maxVersion) throws IOException {final String actualCodec = in.readString();if (!actualCodec.equals(codec)) {throw new CorruptIndexException("codec mismatch: actual codec=" + actualCodec + " vs expected codec=" + codec, in);}final int actualVersion = in.readInt();if (actualVersion < minVersion) {throw new IndexFormatTooOldException(in, actualVersion, minVersion, maxVersion);}if (actualVersion > maxVersion) {throw new IndexFormatTooNewException(in, actualVersion, minVersion, maxVersion);}return actualVersion;}