Package org.apache.lucene.backward_codecs.lucene50

# Class Lucene50CompoundFormat

java.lang.Object
org.apache.lucene.codecs.CompoundFormat
org.apache.lucene.backward_codecs.lucene50.Lucene50CompoundFormat

public final class Lucene50CompoundFormat extends CompoundFormat
Lucene 5.0 compound file format

Files:

- `.cfs`: An optional "virtual" file consisting of all the other index files for systems that frequently run out of file handles.
- `.cfe`: The "virtual" compound file's entry table holding all entries in the corresponding .cfs file.

Description:

- Compound (.cfs) --> Header, FileData FileCount, Footer
- Compound Entry Table (.cfe) --> Header, FileCount, <FileName, DataOffset, DataLength> FileCount
- Header --> `IndexHeader`
- FileCount --> `VInt`
- DataOffset,DataLength,Checksum --> `UInt64`
- FileName --> `String`
- FileData --> raw file data
- Footer --> `CodecFooter`

Notes:

- FileCount indicates how many files are contained in this compound file. The entry table that follows has that many entries.
- Each directory entry contains a long pointer to the start of this file's data section, the files length, and a String with that file's name.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Lucene50CompoundFormat()`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CompoundDirectory`
  `getCompoundReader(Directory dir, SegmentInfo si)`
  `void`
  `write(Directory dir, SegmentInfo si, IOContext context)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Lucene50CompoundFormat

    public Lucene50CompoundFormat()
    Sole constructor.

- ## Method Details

  - ### getCompoundReader

    public CompoundDirectory getCompoundReader(Directory dir, SegmentInfo si) throws IOException
    Specified by:
      `getCompoundReader` in class `CompoundFormat`
    Throws:
      `IOException`

  - ### write

    public void write(Directory dir, SegmentInfo si, IOContext context) throws IOException
    Specified by:
      `write` in class `CompoundFormat`
    Throws:
      `IOException`