org.jboss.vfs.VFS.getChild()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(166)

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

VFS.getChild介绍

[英]Find a virtual file.
[中]找到一个虚拟文件。

代码示例

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

private VirtualFile getFile(URL url) {
  try {
    return VFS.getChild(url.toURI());
  } catch (URISyntaxException e) {
    throw new IllegalArgumentException(e);
  }
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
  public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) {
    try {
      return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase );
    }
    catch (URISyntaxException e) {
      throw new IllegalArgumentException( e );
    }
  }
}

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

@Override
  public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) {
    try {
      return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase );
    }
    catch (URISyntaxException e) {
      throw new IllegalArgumentException( e );
    }
  }
}

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

@Override
  public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) {
    try {
      return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase );
    }
    catch (URISyntaxException e) {
      throw new IllegalArgumentException( e );
    }
  }
}

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

@Override
  public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) {
    try {
      return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase );
    }
    catch (URISyntaxException e) {
      throw JPA_LOGGER.uriSyntaxException(e);
    }
  }
}

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

public VFSArchive(URL rootUrl, String descriptorLocation) throws URISyntaxException, IOException {
  this.rootUrl = rootUrl;
  this.descriptorLocation = descriptorLocation;
  root = VFS.getChild(rootUrl.toURI());
  List<VirtualFile> children = root.getChildrenRecursively(new VirtualFileFilter() {
    @Override
    public boolean accepts(VirtualFile file) {
      return file.isFile();
    }
  });
  files = new HashMap<String, VirtualFile>();
  for (VirtualFile file : children) {
    files.put(file.getPathNameRelativeTo(root), file);
  }
}

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

@Override
public void execute() throws Exception {
  this.buffer = new StringBuilder();
  walk(VFS.getChild(this.env.getJbossHome()));
  this.env.getZip().add(this.buffer.toString(), "jarcheck.txt");
}

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

} else if ("vfs".equals(urlType)) {
  try {
    VirtualFile vfsRoot = VFS.getChild(beansXmlUrl).getParent().getParent();
    handle(vfsRoot);
    return true;

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

private void traverse(String dir, String padding, boolean first)
  throws java.io.IOException {
  VirtualFile path = VFS.getChild(dir);

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

@Override
public void execute() throws Exception {
  VirtualFile root = VFS.getChild(this.env.getJbossHome());
  List<VirtualFile> matches = root.getChildrenRecursively(Filters.and(this.filter, this.blacklistFilter));
  // order the files in some arbitrary way.. basically prep for the limiter so things like log files can
  // be gotten in chronological order.  Keep in mind everything that might be collected per the filter for
  // this collector. If the filter is too broad, you may collect unrelated logs, sort them, and then
  // get some limit on that set, which probably would be wrong.
  if(sorter != null){
    Collections.sort(matches, sorter);
  }
  // limit how much data we collect
  Limiter limiter = new Limiter(limit);
  Iterator<VirtualFile> iter = matches.iterator();
  while(iter.hasNext() && !limiter.isDone()) {
    VirtualFile f = iter.next();
    try (InputStream stream = limiter.limit(f)) {
      InputStream modifiedStream = stream;
      for (Sanitizer sanitizer : this.sanitizers) {
        if (sanitizer.accepts(f)) {
          modifiedStream = sanitizer.sanitize(modifiedStream);
        }
      }
      this.env.getZip().add(f, modifiedStream);
    }
  }
}

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

throw new OperationFailedException(ConnectorLogger.ROOT_LOGGER.compressedRarNotSupportedInModuleRA(moduleName));
} else {
  child = VFS.getChild(path.getPath().split("META-INF")[0]);

代码示例来源:origin: camunda/camunda-bpm-platform

protected VirtualFile getVirtualFileForUrl(final URL url) {
 try {
  return  VFS.getChild(url.toURI());
 }
 catch (URISyntaxException e) {
  throw LOG.exceptionWhileGettingVirtualFolder(url, e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

protected VirtualFile getVirtualFileForUrl(final URL url) {
 try {
  return  VFS.getChild(url.toURI());
 }
 catch (URISyntaxException e) {
  throw LOG.exceptionWhileGettingVirtualFolder(url, e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException {
 try {
  return VFS.getChild(processesXmlResource.toURI());
 } catch(Exception e) {
  throw new DeploymentUnitProcessingException(e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException {
 try {
  return VFS.getChild(processesXmlResource.toURI());
 } catch(Exception e) {
  throw new DeploymentUnitProcessingException(e);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException {
 try {
  return VFS.getChild(processesXmlResource.toURI());
 } catch(Exception e) {
  throw new DeploymentUnitProcessingException(e);
 }
}

代码示例来源:origin: nguyenq/tess4j

copyJarResourceToPath((JarURLConnection) urlConnection, targetPath);
} else if (VFS_PROTOCOL.equals(resourceUrl.getProtocol())) {
  VirtualFile virtualFileOrFolder = VFS.getChild(resourceUrl.toURI());
  copyFromWarToFolder(virtualFileOrFolder, targetPath);
} else {

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

@Override
public VirtualFile getContent(byte[] sha1Bytes) {
  String key = toKey(sha1Bytes);
  VirtualFile result = VFS.getChild(this.index.get(key));
  return result;
}

代码示例来源:origin: io.thorntail/container

@Override
public VirtualFile getContent(byte[] sha1Bytes) {
  String key = toKey(sha1Bytes);
  VirtualFile result = VFS.getChild(this.index.get(key));
  return result;
}

代码示例来源:origin: io.thorntail/container

@Override
public void start(StartContext startContext) throws StartException {
  this.fsMount = VFS.getChild("wildfly-swarm-deployments");
  try {
    this.fsCloseable = VFS.mount(this.fsMount, this.fs);
  } catch (IOException e) {
    throw new StartException(e);
  }
}

相关文章