|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.creole.annic.apache.lucene.index.CompoundFileWriter
final class CompoundFileWriter
Combines multiple files into a single compound file.
The file format:
| Nested Class Summary | |
|---|---|
private static class |
CompoundFileWriter.FileEntry
|
| Field Summary | |
|---|---|
private Directory |
directory
|
private LinkedList |
entries
|
private String |
fileName
|
private HashSet |
ids
|
private boolean |
merged
|
| Constructor Summary | |
|---|---|
CompoundFileWriter(Directory dir,
String name)
Create the compound stream in the specified file. |
|
| Method Summary | |
|---|---|
void |
addFile(String file)
Add a source stream. |
void |
close()
Merge files with the extensions added up to now. |
private void |
copyFile(CompoundFileWriter.FileEntry source,
OutputStream os,
byte[] buffer)
Copy the contents of the file with specified extension into the provided output stream. |
Directory |
getDirectory()
Returns the directory of the compound file. |
String |
getName()
Returns the name of the compound file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Directory directory
private String fileName
private HashSet ids
private LinkedList entries
private boolean merged
| Constructor Detail |
|---|
public CompoundFileWriter(Directory dir,
String name)
| Method Detail |
|---|
public Directory getDirectory()
public String getName()
public void addFile(String file)
public void close()
throws IOException
IOException
private void copyFile(CompoundFileWriter.FileEntry source,
OutputStream os,
byte[] buffer)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||