ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

org.jboss.shrinkwrap.impl.base.importer.zip
Class ZipImporterImpl

java.lang.Object
  extended by org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
      extended by org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl
All Implemented Interfaces:
Assignable, StreamImporter<ZipImporter>, ZipImporter

public class ZipImporterImpl
extends AssignableBase<Archive<?>>
implements ZipImporter

Used to import existing Zip files/streams into the given Archive

Version:
$Revision: $
Author:
Aslak Knutsen

Constructor Summary
ZipImporterImpl(Archive<?> archive)
           
 
Method Summary
 ZipImporter importFrom(File file)
          Imports provided File as a Archive.
 ZipImporter importFrom(InputStream stream)
          Imports provided stream as a Archive.
 ZipImporter importFrom(ZipFile file)
          Imports provided ZipFile as a Archive.
 ZipImporter importZip(ZipFile file)
          Deprecated. 
 ZipImporter importZip(ZipInputStream stream)
          Deprecated. 
 
Methods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
 

Constructor Detail

ZipImporterImpl

public ZipImporterImpl(Archive<?> archive)
Method Detail

importZip

@Deprecated
public ZipImporter importZip(ZipInputStream stream)
Deprecated. 

Imports provided ZipInputStream as a Archive. It remains the responsibility of the caller to close the ZipInputStream.

Specified by:
importZip in interface ZipImporter
Parameters:
stream - the stream to import
Returns:
Archive of the imported Zip
See Also:
ZipImporter.importZip(java.util.zip.ZipInputStream)

importZip

@Deprecated
public ZipImporter importZip(ZipFile file)
Deprecated. 

Imports provided ZipFile as a Archive.

Specified by:
importZip in interface ZipImporter
Parameters:
file - the file to import
Returns:
Archive of the imported Zip
See Also:
ZipImporter.importZip(java.util.zip.ZipFile)

importFrom

public ZipImporter importFrom(InputStream stream)
                       throws ArchiveImportException
Imports provided stream as a Archive. It remains the responsibility of the caller to close the stream.

Specified by:
importFrom in interface StreamImporter<ZipImporter>
Parameters:
stream - the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie. FileInputStream is appropriate, but ZipInputStream or GZIPInputStream is not).
Returns:
Archive of the imported stream
Throws:
ArchiveImportException - If an error occurred during the import process
See Also:
StreamImporter.importFrom(java.io.InputStream)

importFrom

public ZipImporter importFrom(File file)
                       throws ArchiveImportException
Imports provided File as a Archive.

Specified by:
importFrom in interface StreamImporter<ZipImporter>
Parameters:
file - the file to import
Returns:
Archive of the imported Zip
Throws:
ArchiveImportException - If an error occurred during the import process
See Also:
StreamImporter.importFrom(java.io.File)

importFrom

public ZipImporter importFrom(ZipFile file)
                       throws ArchiveImportException
Imports provided ZipFile as a Archive.

Specified by:
importFrom in interface ZipImporter
Parameters:
file - the file to import
Returns:
Archive of the imported Zip
Throws:
ArchiveImportException - If an error occurred during the import process
See Also:
StreamImporter.importFrom(java.io.File)

ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

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