Examples of toURL()


Examples of org.apache.tapestry5.ioc.internal.util.ClasspathResource.toURL()

        byte[] downloaded = readContent(url);

        Resource classpathResource = new ClasspathResource(
                "org/apache/tapestry5/integration/app1/pages/nested/tapestry-button.png");

        byte[] actual = readContent(classpathResource.toURL());

        assertEquals(downloaded, actual);
    }

    /**
 
View Full Code Here

Examples of org.asynchttpclient.uri.Uri.toUrl()

            final int port = uri.getPort();
            requestPacket.setRequestURI(uri.getHost() + ':' + (port == -1 ? 443 : port));
        } else if ((secure || isWebSocket) && config.isUseRelativeURIsWithConnectProxies()) {
            requestPacket.setRequestURI(getNonEmptyPath(uri));
        } else {
            requestPacket.setRequestURI(uri.toUrl());
        }

        final BodyHandler bodyHandler = isPayloadAllowed(method) ?
                bodyHandlerFactory.getBodyHandler(request) :
                null;
View Full Code Here

Examples of org.drools.guvnor.client.rpc.MavenArtifact.toURL()

    @Test
    public void testDownloadRemoteRepository() throws IOException {
        final String jbossReleaseRepo = "http://repository.jboss.org/nexus/content/repositories/releases/";
        final MavenArtifact artifact = new MavenArtifact( "org.drools:knowledge-api:jar:5.3.1.Final:compile" );

        final HttpURLConnection connection = (HttpURLConnection) new URL( artifact.toURL( jbossReleaseRepo ) ).openConnection();
        connection.setRequestMethod( "HEAD" );
        try {
            final int responseCode = connection.getResponseCode();
            if ( responseCode != 200 ) {
                //won't fail if you can't get access to external resource
View Full Code Here

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

            scope.register(deployment);
         // create() creates initial EJB containers and initializes metadata.
         deployment.create();
         if (deployment.getEjbContainers().size() == 0)
         {
            log.trace("Found no containers in scanned jar, consider adding it to the ignore list: " + jar.getName() + " url: " + jar.toURL() + " unit: " + unit.getSimpleName());
            deployment.destroy();
            return;
         }
         // We'll delay the start and let org.jboss.ejb3.deployers.Ejb3DeploymentDeployer start the deployment
         // deployment.start();
View Full Code Here

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

               if (jbossStructure != null)
               {
                  if (trace)
                     log.trace("... context has a META-INF/jboss-structure.xml");

                  URL url = jbossStructure.toURL();
                  UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
                  Unmarshaller unmarshaller = factory.newUnmarshaller();
                  StructureMetaDataObjectFactory ofactory = new StructureMetaDataObjectFactory();
                  unmarshaller.unmarshal(url.toString(), ofactory, structureContext.getMetaData());
                  isJBossStructure = true;
View Full Code Here

Examples of org.jboss.virtual.spi.VirtualFileHandler.toURL()

      assertNotNull("VF not null", handler.getVirtualFile());
      assertFalse("hasBeenModified == false", handler.hasBeenModified());
      assertFalse("hidden == false", handler.isHidden());
      assertFalse("nested == false", handler.isNested());
      assertNotNull("toURI not null", handler.toURI());
      assertNotNull("toURL not null", handler.toURL());
      assertNotNull("toVfsUrl not null", handler.toVfsUrl());

      ByteArrayOutputStream memOut = new ByteArrayOutputStream();
      VFSUtils.copyStreamAndClose(handler.openStream(), memOut);
      assertTrue("read archive content", memOut.size() == handler.getSize());
View Full Code Here

Examples of org.jboss.wsf.common.URLLoaderAdapter.toURL()

      // the expanded war file structure and thus breaks service-ref usage for servlet clients.
      // This needs to be fixed in org.jboss.web.AbstractWebDeployer (JBOSS_AS/server module)
      if (vfsRoot instanceof URLLoaderAdapter)
      {
         URLLoaderAdapter ula = (URLLoaderAdapter)vfsRoot;
         URL rootURL = ula.toURL();
         if ("file".equals(rootURL.getProtocol()) && rootURL.getFile().endsWith(".war"))
         {
            String fileName = rootURL.getFile();

            if (!new File(fileName).exists()) // might be an exploded directory
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile.toURL()

         }

         if (resourceURL == null && getRootFile() != null)
         {
            UnifiedVirtualFile vfResource = getRootFile().findChild(resourcePath);
            resourceURL = vfResource.toURL();
         }

         /*
          if (resourceURL == null)
          {
View Full Code Here

Examples of org.jdesktop.wonderland.common.AssetURI.toURL()

        String serverHostAndPort = manager.getServerNameAndPort();

        // Annotate the URI with the host name and port from the session and
        // return as a URL
        assetURI.setServerHostAndPort(serverHostAndPort);
        return assetURI.toURL();
    }

    /**
     * Given a URI as an asset, returns a URL that can be used to download the
     * asset. This method uses the current primary server session as the host
View Full Code Here

Examples of org.jfree.resourceloader.ResourceManager.toURL()

        final ResourceManager resourceManager =

            DocumentContextUtility.getResourceManager(process.getDocumentContext());

        final URL url = resourceManager.toURL(baseKey);

        if (url != 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.