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;}

public static int CheckHeaderNoMagic(DataInput @in, string codec, int minVersion, int maxVersion){string actualCodec = @in.ReadString();if (!actualCodec.Equals(codec, StringComparison.Ordinal)){throw new System.IO.IOException("codec mismatch: actual codec=" + actualCodec + " vs expected codec=" + codec + " (resource: " + @in + ")");}int actualVersion = @in.ReadInt32();if (actualVersion < minVersion){throw new System.IO.IOException("Version: " + actualVersion + " is not supported. Minimum Version number is " + minVersion + ".");}if (actualVersion > maxVersion){throw new System.IO.IOException("Version: " + actualVersion + " is not supported. Maximum Version number is " + maxVersion + ".");}return actualVersion;}
