Java org.apache.lucene.codecs CodecUtil fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.codecs CodecUtil fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.codecs CodecUtil.

The text is from its open source code.

Field

intCODEC_MAGIC
Constant to identify the start of a codec header.
intFOOTER_MAGIC
Constant to identify the start of a codec footer.

Method

longcheckFooter(ChecksumIndexInput in)
Validates the codec footer previously written by #writeFooter .
voidcheckFooter(ChecksumIndexInput in, Throwable priorException)
Validates the codec footer previously written by #writeFooter , optionally passing an unexpected exception that has already occurred.
intcheckHeader(DataInput in, String codec, int minVersion, int maxVersion)
Reads and validates a header previously written with #writeHeader(DataOutput,String,int) .
intcheckHeaderNoMagic(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.
intcheckIndexHeader(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) .
longchecksumEntireFile(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.

intfooterLength()
Computes the length of a codec footer.
intheaderLength(String codec)
Computes the length of a codec header.
longretrieveChecksum(IndexInput in)
Returns (but does not validate) the checksum previously written by #checkFooter .
voidwriteFooter(IndexOutput out)
Writes a codec footer, which records both a checksum algorithm ID and a checksum.
voidwriteHeader(DataOutput out, String codec, int version)
Writes a codec header, which records both a string to identify the file and a version number.
voidwriteIndexHeader(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).