code: @Override
      public ZipImporter importFrom(InputStream stream, Filter<ArchivePath> filter) throws ArchiveImportException {
          Validate.notNull(stream, "Stream must be specified");
          Validate.notNull(filter, "Filter must be specified");
  
          try {
              // Wrap in ZipInputStream if we haven't been given one
              final ZipInputStream zipStream = new ZipInputStream(stream);
  
              ZipEntry entry;
              while ((entry = zipStream.getNextEntry()) != null) {
                  // Get the name
                  final String entryName = entry.getName();
  
                  if(!filter.include(ArchivePaths.create(entryName))) {
                      zipStream.closeEntry();
                      continue;
                  }
  
                  // Get the archive
                  final Archive<?> archive = this.getArchive();
  
                  // Handle directories separately
                  if (entry.isDirectory()) {
                      archive.addAsDirectory(entryName);
                      continue;
                  }
  
                  final ByteArrayOutputStream output = new ByteArrayOutputStream(8192);
                  IOUtil.copy(zipStream, output);
                  archive.add(new ByteArrayAsset(output.toByteArray()), entryName);
                  zipStream.closeEntry();
              }
          } catch (IOException e) {
              throw new ArchiveImportException("Could not import stream", e);
          }
          return this;
      }
docs: {@inheritDoc}
  
  @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.InputStream, Filter)