public final class CompoundFileWriter extends Object
| Constructor and Description |
|---|
CompoundFileWriter(Directory dir,
String name)
Create the compound stream in the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(String file)
Add a source stream.
|
void |
addFile(String file,
Directory dir)
Same as
addFile(String), only for files that are found in an
external Directory. |
void |
close()
Merge files with the extensions added up to now.
|
Directory |
getDirectory()
Returns the directory of the compound file.
|
String |
getName()
Returns the name of the compound file.
|
public CompoundFileWriter(Directory dir, String name)
NullPointerException - if dir or name is nullpublic Directory getDirectory()
public String getName()
public void addFile(String file)
file is the string by which the
sub-stream will be known in the compound stream.IllegalStateException - if this writer is closedNullPointerException - if file is nullIllegalArgumentException - if a file with the same name
has been added alreadypublic void addFile(String file, Directory dir)
addFile(String), only for files that are found in an
external Directory.public void close()
throws IOException
IllegalStateException - if close() had been called before or
if no file has been added to this objectIOException