private VirtualFile getFile(URL url) { try { return VFS.getChild(url.toURI()); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }
@Override public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) { try { return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase ); } catch (URISyntaxException e) { throw new IllegalArgumentException( e ); } } }
@Override public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) { try { return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase ); } catch (URISyntaxException e) { throw new IllegalArgumentException( e ); } } }
@Override public ArchiveDescriptor buildArchiveDescriptor(URL url, String entryBase) { try { return new VirtualFileSystemArchiveDescriptor( VFS.getChild( url.toURI() ), entryBase ); } catch (URISyntaxException e) { throw new IllegalArgumentException( e ); } } }
@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); } } }
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); } }
@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"); }
} else if ("vfs".equals(urlType)) { try { VirtualFile vfsRoot = VFS.getChild(beansXmlUrl).getParent().getParent(); handle(vfsRoot); return true;
private void traverse(String dir, String padding, boolean first) throws java.io.IOException { VirtualFile path = VFS.getChild(dir);
@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); } } }
throw new OperationFailedException(ConnectorLogger.ROOT_LOGGER.compressedRarNotSupportedInModuleRA(moduleName)); } else { child = VFS.getChild(path.getPath().split("META-INF")[0]);
protected VirtualFile getVirtualFileForUrl(final URL url) { try { return VFS.getChild(url.toURI()); } catch (URISyntaxException e) { throw LOG.exceptionWhileGettingVirtualFolder(url, e); } }
protected VirtualFile getVirtualFileForUrl(final URL url) { try { return VFS.getChild(url.toURI()); } catch (URISyntaxException e) { throw LOG.exceptionWhileGettingVirtualFolder(url, e); } }
protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException { try { return VFS.getChild(processesXmlResource.toURI()); } catch(Exception e) { throw new DeploymentUnitProcessingException(e); } }
protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException { try { return VFS.getChild(processesXmlResource.toURI()); } catch(Exception e) { throw new DeploymentUnitProcessingException(e); } }
protected VirtualFile getFile(URL processesXmlResource) throws DeploymentUnitProcessingException { try { return VFS.getChild(processesXmlResource.toURI()); } catch(Exception e) { throw new DeploymentUnitProcessingException(e); } }
copyJarResourceToPath((JarURLConnection) urlConnection, targetPath); } else if (VFS_PROTOCOL.equals(resourceUrl.getProtocol())) { VirtualFile virtualFileOrFolder = VFS.getChild(resourceUrl.toURI()); copyFromWarToFolder(virtualFileOrFolder, targetPath); } else {
@Override public VirtualFile getContent(byte[] sha1Bytes) { String key = toKey(sha1Bytes); VirtualFile result = VFS.getChild(this.index.get(key)); return result; }
@Override public VirtualFile getContent(byte[] sha1Bytes) { String key = toKey(sha1Bytes); VirtualFile result = VFS.getChild(this.index.get(key)); return result; }
@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); } }