Example usage for Java org.apache.lucene.codecs CodecUtil fields, constructors, methods, implement or subclass
The text is from its open source code.
int | CODEC_MAGIC Constant to identify the start of a codec header. |
int | FOOTER_MAGIC Constant to identify the start of a codec footer. |
long | checkFooter(ChecksumIndexInput in) Validates the codec footer previously written by #writeFooter . |
void | checkFooter(ChecksumIndexInput in, Throwable priorException) Validates the codec footer previously written by #writeFooter , optionally passing an unexpected exception that has already occurred. |
int | checkHeader(DataInput in, String codec, int minVersion, int maxVersion) Reads and validates a header previously written with #writeHeader(DataOutput,String,int) . |
int | checkHeaderNoMagic(DataInput in, String codec, int minVersion, int maxVersion) Like #checkHeader(DataInput,String,int,int) except this version assumes the first int has already been read and validated from the input. |
int | checkIndexHeader(DataInput in, String codec, int minVersion, int maxVersion, byte[] expectedID, String expectedSuffix) Reads and validates a header previously written with #writeIndexHeader(DataOutput,String,int,byte[],String) . |
long | checksumEntireFile(IndexInput input) Clones the provided input, reads all bytes from the file, and calls #checkFooter Note that this method may be slow, as it must process the entire file. |
int | footerLength() Computes the length of a codec footer. |
int | headerLength(String codec) Computes the length of a codec header. |
long | retrieveChecksum(IndexInput in) Returns (but does not validate) the checksum previously written by #checkFooter . |
void | writeFooter(IndexOutput out) Writes a codec footer, which records both a checksum algorithm ID and a checksum. |
void | writeHeader(DataOutput out, String codec, int version) Writes a codec header, which records both a string to identify the file and a version number. |
void | writeIndexHeader(DataOutput out, String codec, int version, byte[] id, String suffix) Writes a codec header for an index file, which records both a string to identify the format of the file, a version number, and data to identify the file instance (ID and auxiliary suffix such as generation). |