Package org.jboss.virtual.spi

Examples of org.jboss.virtual.spi.VirtualFileHandler


   }
 
   public void testRootGetVirtualFile() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      checkVirtualFile(root);
   }
View Full Code Here


   }

   public void testChildGetVirtualFile() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      checkVirtualFile(child);
   }
View Full Code Here

   }

   public void testSubFolderGetVirtualFile() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder");
      checkVirtualFile(child);
   }
View Full Code Here

   }

   public void testSubChildGetVirtualFile() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder/subchild");
      checkVirtualFile(child);
   }
View Full Code Here

   }

   public void testGetVirtualFileClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.getVirtualFile();
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalStateException.class, t);
View Full Code Here

      // can't do this anymore as VirtualFile.toURL() returns a vfs based url
      //assertEquals(handler.toURI(), file.toURI());
      //assertEquals(handler.toURL(), file.toURL());
     
      VirtualFileHandler parent = handler.getParent();
      if (parent == null)
         assertNull(file.getParent());
      else
         assertEquals(parent.getVirtualFile(), file.getParent());
   }
View Full Code Here

      if (context == null)
         throw new IllegalArgumentException("Null context");
      if (path == null)
         throw new IllegalArgumentException("Null path");

      VirtualFileHandler root = context.getRoot();
      assertNotNull(root);
      VirtualFileHandler handler = context.findChild(root, path);
      assertNotNull(handler);
      return handler;
   }
View Full Code Here

      {
         entryMap = new HashMap<String, VirtualFileHandler>();
         for (VirtualFileHandler child : entryChildren)
            entryMap.put(child.getName(), child);
      }
      VirtualFileHandler child = entryMap.get(name);
      if (child == null && allowNull == false)
         throw new FileNotFoundException(this + " has no child: " + name);
      return child;
   }
View Full Code Here

      {
         entryMap = new HashMap<String, VirtualFileHandler>();
         for (VirtualFileHandler child : entryChildren)
            entryMap.put(child.getName(), child);
      }
      VirtualFileHandler child = entryMap.get(name);
      if (child == null && allowNull == false)
         throw new FileNotFoundException(this + " has no child: " + name);
      return child;
   }
View Full Code Here

      {
         entryMap = new HashMap<String, VirtualFileHandler>();
         for (VirtualFileHandler child : entryChildren)
            entryMap.put(child.getName(), child);
      }
      VirtualFileHandler child = entryMap.get(name);
      if (child == null && allowNull == false)
         throw new FileNotFoundException(this + " has no child: " + name);
      return child;
   }
View Full Code Here

TOP

Related Classes of org.jboss.virtual.spi.VirtualFileHandler

Copyright © 2018 www.massapicom. 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.