public final class CompoundFileWriter
extends java.lang.Object
Constructor and Description |
---|
CompoundFileWriter(Directory dir,
java.lang.String name)
Create the compound stream in the specified file.
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(java.lang.String file)
Add a source stream.
|
void |
addFile(java.lang.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.
|
java.lang.String |
getName()
Returns the name of the compound file.
|
public CompoundFileWriter(Directory dir, java.lang.String name)
java.lang.NullPointerException
- if dir
or name
is nullpublic Directory getDirectory()
public java.lang.String getName()
public void addFile(java.lang.String file)
file
is the string by which the
sub-stream will be known in the compound stream.java.lang.IllegalStateException
- if this writer is closedjava.lang.NullPointerException
- if file
is nulljava.lang.IllegalArgumentException
- if a file with the same name
has been added alreadypublic void addFile(java.lang.String file, Directory dir)
addFile(String)
, only for files that are found in an
external Directory
.public void close() throws java.io.IOException
java.lang.IllegalStateException
- if close() had been called before or
if no file has been added to this objectjava.io.IOException
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.