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.LoggerlogLogger
-
Constructor Summary
Constructors Constructor Description ZipImporterImpl(Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ZipImporterimportFrom(java.io.File file)Imports provided File as aArchive.ZipImporterimportFrom(java.io.File file, Filter<ArchivePath> filter)Imports provided File as aArchive.ZipImporterimportFrom(java.io.InputStream stream)Imports provided stream as aArchive.ZipImporterimportFrom(java.io.InputStream stream, Filter<ArchivePath> filter)Imports provided stream as aArchive.ZipImporterimportFrom(java.util.zip.ZipFile file)Imports providedZipFileas aArchive.private ZipImporterimportFrom(java.util.zip.ZipFile file, Filter<ArchivePath> filter)ZipImporterimportZip(java.util.zip.ZipFile file)Deprecated.ZipImporterimportZip(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 providedZipInputStreamas aArchive. It remains the responsibility of the caller to close theZipInputStream.- Specified by:
importZipin 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 providedZipFileas aArchive.- Specified by:
importZipin 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:
importFromin interfaceStreamImporter<ZipImporter>- Parameters:
stream- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStreamis appropriate, butZipInputStreamorGZIPInputStreamis 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:
importFromin interfaceStreamImporter<ZipImporter>- Parameters:
stream- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStreamis appropriate, butZipInputStreamorGZIPInputStreamis 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:
importFromin 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:
importFromin 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 providedZipFileas aArchive.- Specified by:
importFromin 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
-
-