public abstract class AbstractStreamExporterImpl extends AssignableBase<Archive<?>> implements StreamExporter
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
log
Logger
|
Constructor and Description |
---|
AbstractStreamExporterImpl(Archive<?> archive) |
Modifier and Type | Method and Description |
---|---|
void |
exportTo(java.io.File target)
Exports provided archive as in an implementation-specific format, written to the specified
File target. |
void |
exportTo(java.io.File target,
boolean overwrite)
Exports provided archive an implementation-specific format, written to the specified
File target. |
void |
exportTo(java.io.OutputStream target)
Exports provided archive in an implementation-specific format, written to the specified
OutputStream
target. |
protected java.io.OutputStream |
getOutputStreamToFile(java.io.File target,
boolean overwrite)
Obtains an
OutputStream to the provided File . |
as, getArchive
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exportAsInputStream
as
public AbstractStreamExporterImpl(Archive<?> archive)
protected final java.io.OutputStream getOutputStreamToFile(java.io.File target, boolean overwrite) throws FileExistsException
OutputStream
to the provided File
.target
- overwrite
- Whether we may overwrite an existing fileFileExistsException
- If the specified file exists and the overwrite flag is falsejava.lang.IllegalArgumentException
- If the file target is not specifiedpublic void exportTo(java.io.OutputStream target) throws ArchiveExportException, java.lang.IllegalArgumentException
OutputStream
target. The specified target will not be closed or flushed; this is the responsibility of the caller (who
supplied the OutputStream
in the first place).exportTo
in interface StreamExporter
ArchiveExportException
java.lang.IllegalArgumentException
- If the target is not specified or is closedStreamExporter.exportTo(java.io.OutputStream)
public final void exportTo(java.io.File target, boolean overwrite) throws ArchiveExportException, FileExistsException
File
target. If the
target both exists and the "overwrite" flag is true, this call will allow the existing file to be overwritten,
else the invocation will fail with IllegalArgumentException
exportTo
in interface StreamExporter
ArchiveExportException
- if the export process failsFileExistsException
- If the target both already exists and the overwrite flag is falseStreamExporter.exportTo(java.io.File, boolean)
public final void exportTo(java.io.File target) throws ArchiveExportException, FileExistsException
File
target.
If the target exists this call will fail with IllegalArgumentException
exportTo
in interface StreamExporter
ArchiveExportException
- if the export process failsFileExistsException
- If the target already existsStreamExporter.exportTo(java.io.File)