CLucene - a full-featured, c++ search engine
API Documentation
Combines multiple files into a single compound file. More...
#include <CompoundFile.h>
Classes | |
| class | WriterFileEntry |
Public Member Functions | |
| CompoundFileWriter (lucene::store::Directory *dir, const char *name) | |
| Create the compound stream in the specified file. | |
| ~CompoundFileWriter () | |
| lucene::store::Directory * | getDirectory () |
| Returns the directory of the compound file. | |
| const char * | getName () const |
| void | addFile (const char *file) |
| Add a source stream. | |
| void | close () |
| Merge files with the extensions added up to now. | |
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 an encoding identifier, an int64_t pointer to the start of this file's data section, and a UTF String with that file's extension.
| lucene::index::CompoundFileWriter::CompoundFileWriter | ( | lucene::store::Directory * | dir, | |
| const char * | name | |||
| ) |
Create the compound stream in the specified file.
The file name is the entire name (no extensions are added).
| lucene::index::CompoundFileWriter::~CompoundFileWriter | ( | ) |
| void lucene::index::CompoundFileWriter::addFile | ( | const char * | file | ) |
Add a source stream.
file is the string by which the sub-stream will be known in the compound stream.
| IllegalStateException | if this writer is closed | |
| NullPointerException | if file is null | |
| IllegalArgumentException | if a file with the same name has been added already |
| void lucene::index::CompoundFileWriter::close | ( | ) |
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
| IllegalStateException | if close() had been called before or if no file has been added to this object are deleted. |
| lucene:: store ::Directory* lucene::index::CompoundFileWriter::getDirectory | ( | ) |
Returns the directory of the compound file.
| const char* lucene::index::CompoundFileWriter::getName | ( | ) | const |