gpt4 book ai didi

org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl.importFrom()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:02:19 35 4
gpt4 key购买 nike

本文整理了Java中org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl.importFrom()方法的一些代码示例,展示了ZipImporterImpl.importFrom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipImporterImpl.importFrom()方法的具体详情如下:
包路径:org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl
类名称:ZipImporterImpl
方法名:importFrom

ZipImporterImpl.importFrom介绍

暂无

代码示例

代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.ZipImporter#importZip(java.util.zip.ZipInputStream)
 */
@Override
@Deprecated
public ZipImporter importZip(final ZipInputStream stream) {
  // Delegate
  return this.importFrom(stream);
}

代码示例来源:origin: shrinkwrap/shrinkwrap

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.ZipImporter#importZip(java.util.zip.ZipFile)
 */
@Deprecated
@Override
public ZipImporter importZip(ZipFile file) {
  // Delegate
  return this.importFrom(file);
}

代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.ZipImporter#importZip(java.util.zip.ZipFile)
 */
@Deprecated
@Override
public ZipImporter importZip(ZipFile file) {
  // Delegate
  return this.importFrom(file);
}

代码示例来源:origin: shrinkwrap/shrinkwrap

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.ZipImporter#importZip(java.util.zip.ZipInputStream)
 */
@Override
@Deprecated
public ZipImporter importZip(final ZipInputStream stream) {
  // Delegate
  return this.importFrom(stream);
}

代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.File)
 */
@Override
public ZipImporter importFrom(final ZipFile file) throws ArchiveImportException {
  return importFrom(file, Filters.includeAll());
}

代码示例来源:origin: shrinkwrap/shrinkwrap

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.File)
 */
@Override
public ZipImporter importFrom(final ZipFile file) throws ArchiveImportException {
  return importFrom(file, Filters.includeAll());
}

代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.InputStream)
 */
@Override
public ZipImporter importFrom(final InputStream stream) throws ArchiveImportException {
  return importFrom(stream, Filters.includeAll());
}

代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.File)
 */
@Override
public ZipImporter importFrom(final File file) throws ArchiveImportException {
  return importFrom(file, Filters.includeAll());
}

代码示例来源:origin: org.wildfly.swarm/wildfly-swarm-container

protected boolean setupUsingAppArtifact(DependenciesContainer<?> archive) throws IOException {
  String appArtifact = System.getProperty("wildfly.swarm.app.artifact");
  if (appArtifact != null) {
    try (InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream("_bootstrap/" + appArtifact)) {
      ZipImporterImpl importer = new ZipImporterImpl(archive);
      importer.importFrom(in);
    }
    return true;
  }
  return false;
}

代码示例来源:origin: shrinkwrap/shrinkwrap

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.InputStream)
 */
@Override
public ZipImporter importFrom(final InputStream stream) throws ArchiveImportException {
  return importFrom(stream, Filters.includeAll());
}

代码示例来源:origin: shrinkwrap/shrinkwrap

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.File)
 */
@Override
public ZipImporter importFrom(final File file) throws ArchiveImportException {
  return importFrom(file, Filters.includeAll());
}

代码示例来源:origin: org.wildfly.swarm/wildfly-swarm-container

protected boolean setupUsingAppPath(DependenciesContainer<?> archive) throws IOException {
  String appPath = System.getProperty("wildfly.swarm.app.path");
  if (appPath != null) {
    final Path path = Paths.get(System.getProperty("wildfly.swarm.app.path"));
    if (Files.isDirectory(path)) {
      Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
        @Override
        public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
          Path simple = path.relativize(file);
          archive.add(new FileAsset(file.toFile()), convertSeparators(simple));
          return super.visitFile(file, attrs);
        }
      });
    } else {
      ZipImporterImpl importer = new ZipImporterImpl(archive);
      importer.importFrom(new File(System.getProperty("wildfly.swarm.app.path")));
    }
    return true;
  }
  return false;
}

代码示例来源:origin: org.wildfly.swarm/wildfly-swarm-container

public static JavaArchive artifact(String gav) throws IOException, ModuleLoadException {
  File file = findFile(gav);
  JavaArchive archive = ShrinkWrap.create(JavaArchive.class, file.getName());
  new ZipImporterImpl(archive).importFrom(file);
  return archive;
}

代码示例来源:origin: org.wildfly.swarm/wildfly-swarm-container

public static JavaArchive artifact(String gav, String asName) throws IOException, ModuleLoadException {
  File file = findFile(gav);
  JavaArchive archive = ShrinkWrap.create(JavaArchive.class, asName);
  new ZipImporterImpl(archive).importFrom(file);
  return archive;
}

代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.File, Filter)
 */
@Override
public ZipImporter importFrom(File file, Filter<ArchivePath> filter) throws ArchiveImportException {
  Validate.notNull(file, "File must be specified");
  if (file.isDirectory()) {
    throw new IllegalArgumentException("File to import as ZIP must not be a directory: "
      + file.getAbsolutePath());
  }
  Validate.notNull(filter, "Filter must be specified");
  final ZipFile zipFile;
  try {
    zipFile = new ZipFile(file);
  } catch (final IOException ioe) {
    throw new ArchiveImportException("Could not obtain ZIP File from File", ioe);
  }
  // Delegate
  return this.importFrom(zipFile, filter);
}

代码示例来源:origin: org.wildfly.swarm/wildfly-swarm-container

new ZipImporterImpl(archive).importFrom(artifact);
archives.add(archive);
if (artifact.isFile()) {
  JavaArchive archive = ShrinkWrap.create(JavaArchive.class, artifact.getName());
  new ZipImporterImpl(archive).importFrom(artifact);
  archives.add(archive);
} else {

代码示例来源:origin: shrinkwrap/shrinkwrap

/**
 * {@inheritDoc}
 *
 * @see org.jboss.shrinkwrap.api.importer.StreamImporter#importFrom(java.io.File, Filter)
 */
@Override
public ZipImporter importFrom(File file, Filter<ArchivePath> filter) throws ArchiveImportException {
  Validate.notNull(file, "File must be specified");
  if (file.isDirectory()) {
    throw new IllegalArgumentException("File to import as ZIP must not be a directory: "
      + file.getAbsolutePath());
  }
  Validate.notNull(filter, "Filter must be specified");
  final ZipFile zipFile;
  try {
    zipFile = new ZipFile(file);
  } catch (final IOException ioe) {
    throw new ArchiveImportException("Could not obtain ZIP File from File", ioe);
  }
  // Delegate
  return this.importFrom(zipFile, filter);
}

代码示例来源:origin: wildfly-swarm-archive/ARCHIVE-wildfly-swarm

try (InputStream in = ClassLoader.getSystemClassLoader().getResourceAsStream("_bootstrap/" + appArtifact)) {
  ZipImporterImpl importer = new ZipImporterImpl(archive);
  importer.importFrom(in);
  Node jsonNode = archive.get("keycloak.json");
  if (jsonNode == null) {

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com