Package org.jboss.virtual

Examples of org.jboss.virtual.VirtualFile.findChild()


      if (root == null)
      {
         try
         {
            VirtualFile top = VFS.getRoot(rootUrl);
            root = top.findChild(path);
         }
         catch (IOException e)
         {
            throw new IllegalArgumentException("Cannot find root: " + e);          
         }
View Full Code Here


   protected VirtualFile getFile() throws IOException
   {
      if (file == null)
      {
         VirtualFile root = VFS.getRoot(rootUrl);
         file = root.findChild(path);
      }
      return file;
   }

   @SuppressWarnings("deprecation")
View Full Code Here

   public void testBrokenContext() throws Exception
   {
      VirtualFile file = getVirtualFile("/vfs/sundry", "jar/archive.jar");
      log.debug(file.getName() + " " + file);
      assertFalse("Should not be a leaf", file.isLeaf());
      file = file.findChild("empty");
      log.debug(file.getName() + " " + file);
   }
  
   public void testArchive() throws Exception
   {
View Full Code Here

   public void testArchive() throws Exception
   {
      VirtualFile file = getVirtualFile("/vfs/sundry/", "jar/archive.jar");
      log.debug(file.getName() + " " + file);
      assertFalse("Should not be a leaf", file.isLeaf());
      file = file.findChild("empty");
      log.debug(file.getName() + " " + file);
   }
  
   public void testArchive2() throws Exception
   {
View Full Code Here

      url = JarUtils.createJarURL(url);
      VFS vfs = VFS.getVFS(url);
      VirtualFile file = vfs.getRoot();
      log.debug(file.getName() + " " + file);
      assertFalse("Should not be a leaf", file.isLeaf());
      file = file.findChild("empty");
      log.debug(file.getName() + " " + file);
   }
}
View Full Code Here

   protected VirtualFile getFile() throws IOException
   {
      if (file == null)
      {
         VirtualFile root = VFS.getRoot(rootUrl);
         file = root.findChild(path);
      }
      return file;
   }

   @SuppressWarnings("deprecation")
View Full Code Here

      MockVFSContext context = registerSimpleVFSContextWithChildren();

      VirtualFile file = VFS.getRoot(context.getRootURI());
      try
      {
         file.findChild(null);
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
View Full Code Here

      MockVFSContext context = registerSimpleVFSContextWithChildren();

      VirtualFile file = VFS.getRoot(context.getRootURI());
      try
      {
         file.findChild("doesnotexist");
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
View Full Code Here

      MockVFSContext context = registerStructuredVFSContextWithSubChildren();

      VirtualFile file = VFS.getRoot(context.getRootURI());
      try
      {
         file.findChild("child1/doesnotexist");
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
View Full Code Here

      context.getMockRoot().setIOException("getChild");

      VirtualFile file = VFS.getRoot(context.getRootURI());
      try
      {
         file.findChild("child1");
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
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.