Class AbstractStreamExporterImpl
java.lang.Object
org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
org.jboss.shrinkwrap.impl.base.exporter.AbstractStreamExporterImpl
- All Implemented Interfaces:
Assignable, StreamExporter
- Direct Known Subclasses:
TarBz2ExporterImpl, TarExporterImpl, TarGzExporterImpl, ZipExporterImpl, ZipStoredExporterImpl
public abstract class AbstractStreamExporterImpl
extends AssignableBase<Archive<?>>
implements StreamExporter
Base support for I/O Stream-based exporters
- Author:
- ALR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal voidvoidexportTo(OutputStream target) protected final OutputStreamgetOutputStreamToFile(File target, boolean overwrite) Obtains anOutputStreamto the providedFile.Methods inherited from class AssignableBase
as, getArchiveMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Assignable
asMethods inherited from interface StreamExporter
exportAsInputStream
-
Constructor Details
-
AbstractStreamExporterImpl
-
-
Method Details
-
getOutputStreamToFile
protected final OutputStream getOutputStreamToFile(File target, boolean overwrite) throws FileExistsException Obtains anOutputStreamto the providedFile.- Parameters:
target- The target file to write tooverwrite- Whether we may overwrite an existing file- Returns:
- The
OutputStreamto the target file - Throws:
FileExistsException- If the specified file exists and the overwrite flag is falseIllegalArgumentException- If the file target is not specified
-
exportTo
- Specified by:
exportToin interfaceStreamExporter- Throws:
ArchiveExportExceptionIllegalArgumentException- See Also:
-
exportTo
public final void exportTo(File target, boolean overwrite) throws ArchiveExportException, FileExistsException - Specified by:
exportToin interfaceStreamExporter- Throws:
ArchiveExportExceptionFileExistsException- See Also:
-
exportTo
- Specified by:
exportToin interfaceStreamExporter- Throws:
ArchiveExportExceptionFileExistsException- See Also:
-