Package org.apache.lucene.codecs
Class CompoundFormat
- java.lang.Object
-
- org.apache.lucene.codecs.CompoundFormat
-
- Direct Known Subclasses:
Lucene50CompoundFormat
,SimpleTextCompoundFormat
public abstract class CompoundFormat extends java.lang.Object
Encodes/decodes compound files
-
-
Constructor Summary
Constructors Constructor Description CompoundFormat()
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Directory
getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
Returns a Directory view (read-only) for the compound files in this segmentabstract void
write(Directory dir, SegmentInfo si, IOContext context)
Packs the provided segment's files into a compound format.
-
-
-
Method Detail
-
getCompoundReader
public abstract Directory getCompoundReader(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
Returns a Directory view (read-only) for the compound files in this segment- Throws:
java.io.IOException
-
write
public abstract void write(Directory dir, SegmentInfo si, IOContext context) throws java.io.IOException
Packs the provided segment's files into a compound format. All files referenced by the providedSegmentInfo
must haveCodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)
andCodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
.- Throws:
java.io.IOException
-
-