org.jboss.shrinkwrap.api.exporter
Interface ZipExporter

All Superinterfaces:
Assignable

public interface ZipExporter
extends Assignable

Exporter used to represent an Assignable in ZIP format.

Version:
$Revision: $
Author:
John Bailey, Aslak Knutsen, ALR
See Also:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Method Summary
 InputStream exportZip()
          Exports this reference as a Zip archive.
 void exportZip(File target)
          Exports provided archive as a ZIP archive, written to the specified File target.
 void exportZip(File target, boolean overwrite)
          Exports provided archive as a ZIP archive, written to the specified File target.
 void exportZip(OutputStream target)
          Exports provided archive as a ZIP archive, written to the specified OutputStream target.
 
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
 

Method Detail

exportZip

InputStream exportZip()
Exports this reference as a Zip archive.

Returns:
InputStream for exported Zip

exportZip

void exportZip(File target)
               throws ArchiveExportException,
                      FileExistsException,
                      IllegalArgumentException
Exports provided archive as a ZIP archive, written to the specified File target. If the target exists this call will fail with IllegalArgumentException

Parameters:
archive -
Throws:
IllegalArgumentException - If the target is not specified
FileExistsException - If the target already exists
ArchiveExportException - if the export process fails

exportZip

void exportZip(OutputStream target)
               throws ArchiveExportException,
                      IllegalArgumentException
Exports provided archive as a ZIP archive, written to the specified OutputStream target. The specified target will be closed upon completion.

Parameters:
target -
Throws:
ArchiveExportException
IllegalArgumentException - If the target is not specified

exportZip

void exportZip(File target,
               boolean overwrite)
               throws ArchiveExportException,
                      FileExistsException,
                      IllegalArgumentException
Exports provided archive as a ZIP archive, written to the specified 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

Parameters:
archive -
Throws:
IllegalArgumentException - If the target is not specified
FileExistsException - If the target both already exists and the overwrite flag is false
ArchiveExportException - if the export process fails


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.