Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » index » [javadoc | source]
org.apache.lucene.index
final class: CompoundFileWriter [javadoc | source]
java.lang.Object
   org.apache.lucene.index.CompoundFileWriter
Combines multiple files into a single compound file. The file format:
The fileCount integer indicates how many files are contained in this compound file. The {directory} that follows has that many entries. Each directory entry contains a long pointer to the start of this file's data section, and a String with that file's name.
Constructor:
 public CompoundFileWriter(Directory dir,
    String name) 
    Create the compound stream in the specified file. The file name is the entire name (no extensions are added).
    Throws:
    NullPointerException - if dir or name is null
 CompoundFileWriter(Directory dir,
    String name,
    SegmentMerger.CheckAbort checkAbort) 
Method from org.apache.lucene.index.CompoundFileWriter Summary:
addFile,   close,   getDirectory,   getName
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.CompoundFileWriter Detail:
 public  void addFile(String file) 
    Add a source stream. file is the string by which the sub-stream will be known in the compound stream.
 public  void close() throws IOException 
    Merge files with the extensions added up to now. All files with these extensions are combined sequentially into the compound stream. After successful merge, the source files are deleted.
 public Directory getDirectory() 
    Returns the directory of the compound file.
 public String getName() 
    Returns the name of the compound file.