@Override public long getChecksum() throws IOException { return delegate.getChecksum(); }
/** * Writes CRC32 value as a 64-bit long to the output. * @throws IllegalStateException if CRC is formatted incorrectly (wrong bits set) * @throws IOException if an i/o error occurs */ static void writeCRC(IndexOutput output) throws IOException { long value = output.getChecksum(); if ((value & 0xFFFFFFFF00000000L) != 0) { throw new IllegalStateException("Illegal CRC-32 checksum: " + value + " (resource=" + output + ")"); } output.writeLong(value); } }
@Override public long getChecksum() throws IOException { return out.getChecksum(); }
@Override public long getChecksum() throws IOException { return out.getChecksum(); }
@Override public long getChecksum() throws IOException { return delegate.getChecksum(); } }
@Override public long getChecksum() throws IOException { return delegate.getChecksum(); }
@Override public long getChecksum() throws IOException { return out.getChecksum(); }
@Override public long getChecksum() throws IOException { return delegate.getChecksum(); }
@Override public long getChecksum() throws IOException { return out.getChecksum(); }
@Override public long getChecksum() throws IOException { return delegate.getChecksum(); }
@Override public long getChecksum() throws IOException { return out.getChecksum(); }
@Override public long getChecksum() throws IOException { return out.getChecksum(); }
@Override public long getChecksum() throws IOException { return delegate.getChecksum(); }
/** * Writes CRC32 value as a 64-bit long to the output. * @throws IllegalStateException if CRC is formatted incorrectly (wrong bits set) * @throws IOException if an i/o error occurs */ static void writeCRC(IndexOutput output) throws IOException { long value = output.getChecksum(); if ((value & 0xFFFFFFFF00000000L) != 0) { throw new IllegalStateException("Illegal CRC-32 checksum: " + value + " (resource=" + output + ")"); } output.writeLong(value); } }
/** * Writes CRC32 value as a 64-bit long to the output. * @throws IllegalStateException if CRC is formatted incorrectly (wrong bits set) * @throws IOException if an i/o error occurs */ public static void writeCRC(IndexOutput output) throws IOException { long value = output.getChecksum(); if ((value & 0xFFFFFFFF00000000L) != 0) { throw new IllegalStateException("Illegal CRC-32 checksum: " + value + " (resource=" + output + ")"); } output.writeLong(value); } }
/** * Writes CRC32 value as a 64-bit long to the output. * @throws IllegalStateException if CRC is formatted incorrectly (wrong bits set) * @throws IOException if an i/o error occurs */ public static void writeCRC(IndexOutput output) throws IOException { long value = output.getChecksum(); if ((value & 0xFFFFFFFF00000000L) != 0) { throw new IllegalStateException("Illegal CRC-32 checksum: " + value + " (resource=" + output + ")"); } output.writeLong(value); } }
public static void writeChecksum(IndexOutput out, BytesRefBuilder scratch) throws IOException { // Pad with zeros so different checksum values use the // same number of bytes // (BaseIndexFileFormatTestCase.testMergeStability cares): String checksum = String.format(Locale.ROOT, "%020d", out.getChecksum()); write(out, CHECKSUM); write(out, checksum, scratch); writeNewline(out); }