Package org.jboss.vfs

Examples of org.jboss.vfs.VirtualFile.toURL()


      {
         try
         {
            VirtualFile child = root.getChild(name);
            if (child.exists())
               urls.add(child.toURL());
         }
         catch (Exception e)
         {
            log.debug("Error getting resources for " + root, e);
         }
View Full Code Here


      if (root != null)
      {
         try
         {
            rootURL = root.toURL().toString();
            manifest = manifestCache.get(rootURL);
            if (manifest == null)
            {
               manifest = VFSUtils.getManifest(root);
               if (manifest == null)
View Full Code Here

         return null;
      }
      try
      {
         VirtualFile root = findRoot(path);
         URL codeSourceURL = root.toURL();

         if (log.isTraceEnabled())
            log.trace("getProtectionDomain:className="+ className + " path="+ path + " codeSourceURL=" + codeSourceURL);

         final CodeSigner[] signers = clazz.getCodeSigners();
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw MESSAGES.childNotFound(jar, baseDir);
                return jarFile.toURL();
            } catch (Exception e1) {
                throw MESSAGES.relativePathNotFound(e1, jar);
            }
        }
    }
View Full Code Here

        try {
            final VirtualFile file = root.getChild(PathUtils.canonicalize(name));
            if (!file.exists()) {
                return null;
            }
            return new VFSEntryResource(file, file.toURL());
        } catch (MalformedURLException e) {
            // must be invalid...?  (todo: check this out)
            return null;
        }
    }
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw MESSAGES.childNotFound(jar, baseDir);
                return jarFile.toURL();
            } catch (Exception e1) {
                throw MESSAGES.relativePathNotFound(e1, jar);
            }
        }
    }
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw MESSAGES.childNotFound(jar, baseDir);
                return jarFile.toURL();
            } catch (Exception e1) {
                throw MESSAGES.relativePathNotFound(e1, jar);
            }
        }
    }
View Full Code Here

                VirtualFile parent = deploymentUnitFile.getParent().getParent().getParent();
                VirtualFile baseDir = (parent != null ? parent : deploymentUnitFile);
                VirtualFile jarFile = baseDir.getChild(jar);
                if (jarFile == null)
                    throw MESSAGES.childNotFound(jar, baseDir);
                return jarFile.toURL();
            } catch (Exception e1) {
                throw MESSAGES.relativePathNotFound(e1, jar);
            }
        }
    }
View Full Code Here

            rootFile = metaData.getApplicationRootFile();

            if (rootFile != null) {
                VirtualFile root = VFS.getChild( rootFile.toURI() );
                if (!root.exists()) {
                    throw new DeploymentUnitProcessingException( "Application root does not exist: " + root.toURL().toExternalForm() );
                }

                if (root.exists() && !root.isDirectory()) {
                    // Expand the referenced root if it's not a directory (ie
                    // .knob archive)
View Full Code Here

        try {
            final VirtualFile file = root.getChild(PathUtils.canonicalize(name));
            if (!file.exists()) {
                return null;
            }
            return new VFSEntryResource(file, file.toURL());
        } catch (MalformedURLException e) {
            // must be invalid...?  (todo: check this out)
            return null;
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.