Examples of VFSContext


Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testFindChildNullPath() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      try
      {
         context.findChild(root, null);
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testVisit() throws Exception
   {
      VFSContext context = getVFSContext("children");
      VirtualFileHandler root = context.getRoot();
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor();
      context.visit(root, visitor);
     
      Set<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals(expected, actual);
   }

   public void testVisitNullHandler() throws Exception
   {
      VFSContext context = getVFSContext("children");
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor();
      try
      {
         context.visit(null, visitor);
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testVisitNullVisitor() throws Exception
   {
      VFSContext context = getVFSContext("children");
      VirtualFileHandler root = context.getRoot();
      try
      {
         context.visit(root, null);
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

   }

   public VFSContext getVFS(URI rootURI) throws IOException
   {
      throwIOException("getVFSURI");
      VFSContext context = contexts.get(rootURI);
      if (context == null)
         throw new IOException("No such context " + rootURI);
      return context;
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

   public static VFS getVFS(URI rootURI) throws IOException
   {
      VFSContextFactory factory = VFSContextFactoryLocator.getFactory(rootURI);
      if (factory == null)
         throw new IOException("No context factory for " + rootURI);
      VFSContext context = factory.getVFS(rootURI);
      return context.getVFS();
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

   public static VFS getVFS(URL rootURL) throws IOException
   {
      VFSContextFactory factory = VFSContextFactoryLocator.getFactory(rootURL);
      if (factory == null)
         throw new IOException("No context factory for " + rootURL);
      VFSContext context = factory.getVFS(rootURL);
      return context.getVFS();
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      if (file == null)
         throw new IllegalArgumentException("Null file");

      VirtualFileHandler handler = file.getHandler();
      WrappingVirtualFileHandlerVisitor wrapper = new WrappingVirtualFileHandlerVisitor(visitor);
      VFSContext handlerContext = handler.getVFSContext();
      handlerContext.visit(handler, wrapper);
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

    * @return the VFS
    * @throws IllegalStateException if the file is closed
    */
   public VFS getVFS()
   {
      VFSContext context = getHandler().getVFSContext();
      return context.getVFS();
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

  
   protected abstract long getRealSize(String name, String path) throws Exception;
  
   public void testRootName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      String rootName = getRootName("complex");
      assertEquals(rootName, root.getName());
   }
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.