Package org.jboss.virtual

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


      };

      URL [] classesURLs = new URL []
      {
         classes.toURL(),
         new URL(classes.toURL() + "?" + VFSUtils.USE_COPY_QUERY + "=true")
      };

      for (URL url: classesURLs)
      {
         JarInputStream jis = new JarInputStream( url.openStream() );
View Full Code Here


   {
      URL dynamicClassRoot = new URL("vfsmemory", new GUID().toString(), "");
      MemoryFileFactory.createRoot(dynamicClassRoot);
      URL classesURL = new URL(dynamicClassRoot, "classes");
      VirtualFile classes = MemoryFileFactory.createDirectory(classesURL);
      URL url = classes.toURL();
      try
      {
         VFS.getRoot(url);
         fail("Should not be here");
      }
View Full Code Here

      URL dynamicClassRoot = new URL("vfsmemory", GUID.asString(), "");
      VirtualFile root = MemoryFileFactory.createRoot(dynamicClassRoot).getRoot();
      assertEquals(root, VFS.getRoot(dynamicClassRoot));
      VirtualFile file = MemoryFileFactory.putFile(new URL(dynamicClassRoot + "/classes/somename"), new byte[0]);
      assertNotNull(file);
      System.out.println(file.toURL());
   }

   public void testSerializable() throws Exception
   {
      URI uri = new URI("vfsmemory://aopdomain");
View Full Code Here

      VFS root = VFS.getVFS(url);

      VirtualFile ear = root.getChild("level1.zip");
      VirtualFile earCopy = modify(ear);
      assertFalse(earCopy.isLeaf());
      assertEquals(ear.toURL(), earCopy.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/", earCopy.toURL().toExternalForm());

      VirtualFile o2 = ear.getChild("level2.zip");
      VirtualFile l2 = earCopy.getChild("level2.zip");
      assertFalse(l2.isLeaf());
View Full Code Here

      VirtualFile ear = root.getChild("level1.zip");
      VirtualFile earCopy = modify(ear);
      assertFalse(earCopy.isLeaf());
      assertEquals(ear.toURL(), earCopy.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/", earCopy.toURL().toExternalForm());

      VirtualFile o2 = ear.getChild("level2.zip");
      VirtualFile l2 = earCopy.getChild("level2.zip");
      assertFalse(l2.isLeaf());
      assertEquals(o2.toURL(), l2.toURL());
View Full Code Here

      assertEquals(getProtocol() + urlString + "level1.zip/", earCopy.toURL().toExternalForm());

      VirtualFile o2 = ear.getChild("level2.zip");
      VirtualFile l2 = earCopy.getChild("level2.zip");
      assertFalse(l2.isLeaf());
      assertEquals(o2.toURL(), l2.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/", l2.toURL().toExternalForm());

      VirtualFile o2sub = o2.getChild("test2.txt");
      VirtualFile l2sub = l2.getChild("test2.txt");
      assertTrue(l2sub.isLeaf());
View Full Code Here

      VirtualFile o2 = ear.getChild("level2.zip");
      VirtualFile l2 = earCopy.getChild("level2.zip");
      assertFalse(l2.isLeaf());
      assertEquals(o2.toURL(), l2.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/", l2.toURL().toExternalForm());

      VirtualFile o2sub = o2.getChild("test2.txt");
      VirtualFile l2sub = l2.getChild("test2.txt");
      assertTrue(l2sub.isLeaf());
      assertEquals(o2sub.toURL(), l2sub.toURL());
View Full Code Here

      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/", l2.toURL().toExternalForm());

      VirtualFile o2sub = o2.getChild("test2.txt");
      VirtualFile l2sub = l2.getChild("test2.txt");
      assertTrue(l2sub.isLeaf());
      assertEquals(o2sub.toURL(), l2sub.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/test2.txt", l2sub.toURL().toExternalForm());

      VirtualFile o3 = o2.getChild("level3.zip");
      VirtualFile l3 = l2.getChild("level3.zip");
      assertFalse(l3.isLeaf());
View Full Code Here

      VirtualFile o2sub = o2.getChild("test2.txt");
      VirtualFile l2sub = l2.getChild("test2.txt");
      assertTrue(l2sub.isLeaf());
      assertEquals(o2sub.toURL(), l2sub.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/test2.txt", l2sub.toURL().toExternalForm());

      VirtualFile o3 = o2.getChild("level3.zip");
      VirtualFile l3 = l2.getChild("level3.zip");
      assertFalse(l3.isLeaf());
      assertEquals(o3.toURL(), l3.toURL());
View Full Code Here

      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/test2.txt", l2sub.toURL().toExternalForm());

      VirtualFile o3 = o2.getChild("level3.zip");
      VirtualFile l3 = l2.getChild("level3.zip");
      assertFalse(l3.isLeaf());
      assertEquals(o3.toURL(), l3.toURL());
      assertEquals(getProtocol() + urlString + "level1.zip/level2.zip/level3.zip/", l3.toURL().toExternalForm());

      VirtualFile o3sub = o3.getChild("test3.txt");
      VirtualFile l3sub = l3.getChild("test3.txt");
      assertTrue(l3sub.isLeaf());
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.