Class ZipImporterImpl
- java.lang.Object
-
- org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
-
- 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 givenArchive
- Version:
- $Revision: $
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Logger
log
Logger
-
Constructor Summary
Constructors Constructor Description ZipImporterImpl(Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ZipImporter
importFrom(java.io.File file)
Imports provided File as aArchive
.ZipImporter
importFrom(java.io.File file, Filter<ArchivePath> filter)
Imports provided File as aArchive
.ZipImporter
importFrom(java.io.InputStream stream)
Imports provided stream as aArchive
.ZipImporter
importFrom(java.io.InputStream stream, Filter<ArchivePath> filter)
Imports provided stream as aArchive
.ZipImporter
importFrom(java.util.zip.ZipFile file)
Imports providedZipFile
as aArchive
.private ZipImporter
importFrom(java.util.zip.ZipFile file, Filter<ArchivePath> filter)
ZipImporter
importZip(java.util.zip.ZipFile file)
Deprecated.ZipImporter
importZip(java.util.zip.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(java.util.zip.ZipInputStream stream)
Deprecated.Imports providedZipInputStream
as aArchive
. It remains the responsibility of the caller to close theZipInputStream
.- Specified by:
importZip
in interfaceZipImporter
- 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(java.util.zip.ZipFile file)
Deprecated.Imports providedZipFile
as aArchive
.- Specified by:
importZip
in interfaceZipImporter
- Parameters:
file
- the file to import- Returns:
- Archive of the imported Zip
- See Also:
ZipImporter.importZip(java.util.zip.ZipFile)
-
importFrom
public ZipImporter importFrom(java.io.InputStream stream) throws ArchiveImportException
Imports provided stream as aArchive
. It remains the responsibility of the caller to close the stream.- Specified by:
importFrom
in interfaceStreamImporter<ZipImporter>
- Parameters:
stream
- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStream
is appropriate, butZipInputStream
orGZIPInputStream
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(java.io.InputStream stream, Filter<ArchivePath> filter) throws ArchiveImportException
Imports provided stream as aArchive
. It remains the responsibility of the caller to close the stream.- Specified by:
importFrom
in interfaceStreamImporter<ZipImporter>
- Parameters:
stream
- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStream
is appropriate, butZipInputStream
orGZIPInputStream
is not).filter
- Filter to match result- Returns:
- Archive of the imported stream
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.InputStream, Filter)
-
importFrom
public ZipImporter importFrom(java.io.File file) throws ArchiveImportException
Imports provided File as aArchive
.- Specified by:
importFrom
in interfaceStreamImporter<ZipImporter>
- Parameters:
file
- the file to import- Returns:
- Archive of the imported file
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.File)
-
importFrom
public ZipImporter importFrom(java.io.File file, Filter<ArchivePath> filter) throws ArchiveImportException
Imports provided File as aArchive
.- Specified by:
importFrom
in interfaceStreamImporter<ZipImporter>
- Parameters:
file
- the file to importfilter
- Filter to match result- Returns:
- Archive of the imported file
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.File, Filter)
-
importFrom
public ZipImporter importFrom(java.util.zip.ZipFile file) throws ArchiveImportException
Imports providedZipFile
as aArchive
.- Specified by:
importFrom
in interfaceZipImporter
- 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
private ZipImporter importFrom(java.util.zip.ZipFile file, Filter<ArchivePath> filter) throws ArchiveImportException
- Throws:
ArchiveImportException
-
-