public static long checkFooter(ChecksumIndexInput in) throws IOException {validateFooter(in);long actualChecksum = in.getChecksum();long expectedChecksum = readCRC(in);if (expectedChecksum != actualChecksum) {throw new CorruptIndexException("checksum failed (hardware problem?) : expected=" + Long.toHexString(expectedChecksum) +" actual=" + Long.toHexString(actualChecksum), in);}return actualChecksum;}
public static long CheckFooter(ChecksumIndexInput @in){ValidateFooter(@in);long actualChecksum = @in.Checksum;long expectedChecksum = @in.ReadInt64();if (expectedChecksum != actualChecksum){throw new System.IO.IOException("checksum failed (hardware problem?) : expected=" + expectedChecksum.ToString("x") + " actual=" + actualChecksum.ToString("x") + " (resource=" + @in + ")");}if (@in.GetFilePointer() != @in.Length){throw new System.IO.IOException("did not read all bytes from file: read " + @in.GetFilePointer() + " vs size " + @in.Length + " (resource: " + @in + ")");}return actualChecksum;}