ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

org.jboss.shrinkwrap.impl.base.importer.tar
Class TarImporterImpl

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

public class TarImporterImpl
extends AssignableBase<Archive<?>>
implements TarImporter

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

Author:
ALR

Constructor Summary
TarImporterImpl(Archive<?> archive)
           
 
Method Summary
 I importFrom(File file)
          Imports provided File as a Archive.
 I importFrom(InputStream stream)
          Imports provided stream as a Archive.
 
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.importer.StreamImporter
importFrom, importFrom
 
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
 

Constructor Detail

TarImporterImpl

public TarImporterImpl(Archive<?> archive)
Method Detail

importFrom

public I 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<I extends StreamImporter<I>>
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 I importFrom(File file)
                                       throws ArchiveImportException
Imports provided File as a Archive.

Specified by:
importFrom in interface StreamImporter<I extends StreamImporter<I>>
Parameters:
file - the file to import
Returns:
Archive of the imported Zip
Throws:
ArchiveImportException - If an error occurred during the import process
See Also:
org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.lang.Object)

ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

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