Interface StreamExporter
-
- All Superinterfaces:
Assignable
- All Known Subinterfaces:
TarBz2Exporter
,TarExporter
,TarGzExporter
,ZipExporter
,ZipStoredExporter
- All Known Implementing Classes:
AbstractStreamExporterImpl
,TarBz2ExporterImpl
,TarExporterImpl
,TarGzExporterImpl
,ZipExporterImpl
,ZipStoredExporterImpl
public interface StreamExporter extends Assignable
Generic exporter capable of representing anAssignable
as anInputStream
, or writing its contents to a providedOutputStream
orFile
.- Version:
- $Revision: $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStream
exportAsInputStream()
Exports this reference in an implementation-specific format represented by the returned newInputStream
instancevoid
exportTo(java.io.File target)
Exports provided archive as in an implementation-specific format, written to the specifiedFile
target.void
exportTo(java.io.File target, boolean overwrite)
Exports provided archive an implementation-specific format, written to the specifiedFile
target.void
exportTo(java.io.OutputStream target)
Exports provided archive in an implementation-specific format, written to the specifiedOutputStream
target.-
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
-
-
-
Method Detail
-
exportAsInputStream
java.io.InputStream exportAsInputStream()
Exports this reference in an implementation-specific format represented by the returned newInputStream
instance- Returns:
- A new
InputStream
to read the exported view
-
exportTo
void exportTo(java.io.OutputStream target) throws ArchiveExportException, java.lang.IllegalArgumentException
Exports provided archive in an implementation-specific format, written to the specifiedOutputStream
target. The specified target will not be closed or flushed; this is the responsibility of the caller (who supplied theOutputStream
in the first place).- Parameters:
target
-- Throws:
ArchiveExportException
java.lang.IllegalArgumentException
- If the target is not specified or is closed
-
exportTo
void exportTo(java.io.File target) throws ArchiveExportException, FileExistsException
Exports provided archive as in an implementation-specific format, written to the specifiedFile
target. If the target exists this call will fail withIllegalArgumentException
- Parameters:
target
-- Throws:
java.lang.IllegalArgumentException
- If the target is not specifiedFileExistsException
- If the target already existsArchiveExportException
- if the export process fails
-
exportTo
void exportTo(java.io.File target, boolean overwrite) throws ArchiveExportException, FileExistsException
Exports provided archive an implementation-specific format, written to the specifiedFile
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 withIllegalArgumentException
- Parameters:
target
-- Throws:
java.lang.IllegalArgumentException
- If the target is not specified or is a directoryFileExistsException
- If the target both already exists and the overwrite flag is falseArchiveExportException
- if the export process fails
-
-