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
Used to import existing Zip files/streams into the given
Archive
- Version:
- $Revision: $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionimportFrom
(File file) Imports provided File as aArchive
.importFrom
(File file, Filter<ArchivePath> filter) Imports provided File as aArchive
.importFrom
(InputStream stream) Imports provided stream as aArchive
.importFrom
(InputStream stream, Filter<ArchivePath> filter) Imports provided stream as aArchive
.importFrom
(ZipFile file) private ZipImporter
importFrom
(ZipFile file, Filter<ArchivePath> filter) Deprecated.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
-
Field Details
-
log
Logger
-
-
Constructor Details
-
ZipImporterImpl
-
-
Method Details
-
importZip
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:
-
importZip
Deprecated.- Specified by:
importZip
in interfaceZipImporter
- Parameters:
file
- the file to import- Returns:
- Archive of the imported Zip
- See Also:
-
importFrom
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:
-
importFrom
public ZipImporter importFrom(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:
-
importFrom
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:
-
importFrom
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:
-
importFrom
- 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:
-
importFrom
private ZipImporter importFrom(ZipFile file, Filter<ArchivePath> filter) throws ArchiveImportException - Throws:
ArchiveImportException
-