Package java.net

Examples of java.net.URI.toURL()


            // check where domain uris are urls, they will be used to configure various
            // endpoints if they are
            URI tmpURI;
            try {
                tmpURI = new URI(domainModel.getDomainURI());
                domainModel.setDomainURL(tmpURI.toURL().toExternalForm());
            } catch(Exception ex) {
                domainModel.setDomainURL(null);
            }           
         
            // Check if node has been given a valid domain name to connect to
View Full Code Here


    private static WebAppServletHost host;

    private static URL getResource(ServletContext servletContext, String location) throws IOException {
        URI uri = URI.create(location);
        if (uri.isAbsolute()) {
            return uri.toURL();
        } else {
            String path = location;
            if (!path.startsWith(ROOT)) {
                path = ROOT + path;
            }
View Full Code Here

            URI uri = createURI(contrib.getLocation());
            if (uri.getScheme() == null) {
                uri = new File(contrib.getLocation()).toURI();
            }
            URL contributionURL = uri.toURL();

            // Load the contribution
            logger.log(quietLogging? Level.FINE : Level.INFO, "Loading contribution: " + contributionURL);
            Contribution contribution = deployer.loadContribution(contributionURI, contributionURL, context.getMonitor());
            contributions.add(contribution);
View Full Code Here

                            throw new ServiceRuntimeException("Deployment composite " + dcURI
                                + " cannot be found within contribution "
                                + contribution.getLocation());
                        }
                    } else {
                        URL url = dcURI.toURL();
                        InputStream is = openStream(url);
                        Reader xml = new InputStreamReader(is, "UTF-8");
                        attached = attachDeploymentComposite(contribution, xml, url.toString(), attached, context);
                    }
                }
View Full Code Here

        InputStream inputStream = null;
        URI resolvedSystemIDURI;
        try {
            resolvedSystemIDURI = localRepositoryURI.resolve(fileName);
            inputStream = resolvedSystemIDURI.toURL().openStream();
        } catch (IOException e) {
            return null;
        } catch (IllegalArgumentException e) {
            //typically "uri is not absolute"
            return null;
View Full Code Here

                Map.Entry entry = (Map.Entry) iterator.next();
                users.put(entry.getValue(), entry.getKey());
            }

            Properties temp = new Properties();
            stream = groupFile.toURL().openStream();
            temp.load(stream);
            stream.close();

            Enumeration e = temp.keys();
            while (e.hasMoreElements()) {
View Full Code Here

            InputStream stream = userFile.toURL().openStream();
            users.load(stream);
            stream.close();

            Properties temp = new Properties();
            stream = groupFile.toURL().openStream();
            temp.load(stream);
            stream.close();

            Enumeration e = temp.keys();
            while (e.hasMoreElements()) {
View Full Code Here

        InputStream inputStream = null;
        URI resolvedSystemIDURI;
        try {
            resolvedSystemIDURI = localRepositoryURI.resolve(fileName);
            inputStream = resolvedSystemIDURI.toURL().openStream();
        } catch (IOException e) {
            return null;
        } catch (IllegalArgumentException e) {
            //typically "uri is not absolute"
            return null;
View Full Code Here

        long timestamp = 0;
        if ("file".equals(wsdlURI.getScheme())) {
            timestamp = new File(wsdlURI).lastModified();
        } else {
            try {
                timestamp = wsdlURI.toURL().openConnection().getDate();
            } catch (Exception e) {
                //ignore
            }
        }
       
View Full Code Here

                + configLocation);
        URI uri = new URI(configLocation);

        // validate the location first: invalid location will result in
        // default configuration being configured, try to avoid that...
        uri.toURL().openStream().close();

        loggerContext.setConfigLocation(uri);
        LOGGER.debug("Completed remote request to reconfigure.");
    }
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.