Lucene.Net.Codecs.CodecUtil.WriteFooter C# (CSharp) Метод

WriteFooter() публичный статический Метод

Writes a codec footer, which records both a checksum algorithm ID and a checksum. this footer can be parsed and validated with #checkFooter(ChecksumIndexInput) checkFooter().

CodecFooter --> Magic,AlgorithmID,Checksum

  • Magic --> DataOutput#writeInt Uint32. this identifies the start of the footer. It is always {@value #FOOTER_MAGIC}.
  • AlgorithmID --> DataOutput#writeInt Uint32. this indicates the checksum algorithm used. Currently this is always 0, for zlib-crc32.
  • Checksum --> DataOutput#writeLong Uint32. The actual checksum value for all previous bytes in the stream, including the bytes from Magic and AlgorithmID.
If there is an I/O error writing to the underlying medium.
public static WriteFooter ( Lucene.Net.Store.IndexOutput @out ) : void
@out Lucene.Net.Store.IndexOutput
Результат void
        public static void WriteFooter(IndexOutput @out)
        {
            @out.WriteInt(FOOTER_MAGIC);
            @out.WriteInt(0);
            @out.WriteLong(@out.Checksum);
        }