Package com.sun.midp.io

Examples of com.sun.midp.io.HttpUrl


     */
    protected void checkForDifferentDomains(String url) {
        String previousUrl = state.previousInstallInfo.getDownloadUrl();
        // perform a domain check not a straight compare
        if (info.authPath == null && previousUrl != null) {
            HttpUrl old = new HttpUrl(previousUrl);
            HttpUrl current = new HttpUrl(url);

            if ((current.domain != null && old.domain == null) ||
                (current.domain == null && old.domain != null) ||
                (current.domain != null && old.domain != null &&
                 !current.domain.regionMatches(true, 0, old.domain, 0,
View Full Code Here


        if (url == null) {
            return null;
        }

        /* this will parse any kind of URL, not only Http */
        HttpUrl parsedUrl = new HttpUrl(url);

        if (parsedUrl.scheme == null) {
            return defaultScheme;
        }

View Full Code Here

        if (url == null) {
            return null;
        }

        /* this will parse any kind of URL, not only Http */
        HttpUrl parsedUrl = new HttpUrl(url);
        return parsedUrl.path;
    }
View Full Code Here

     * @exception ConnectionNotFoundException if connection contains any host
     *               name
     */
    protected void checkIsNotHost(String connection, boolean checkPort)
        throws IllegalArgumentException, ConnectionNotFoundException {
        HttpUrl url = new HttpUrl(connection);
        // Server connections do not have a host
        if (url.host != null) {
            throw new ConnectionNotFoundException(
                "Connection not supported");
        }
View Full Code Here

     */
    protected void checkForDifferentDomains(String url) {
        String previousUrl = state.previousInstallInfo.getDownloadUrl();
        // perform a domain check not a straight compare
        if (info.authPath == null && previousUrl != null) {
            HttpUrl old = new HttpUrl(previousUrl);
            HttpUrl current = new HttpUrl(url);

            if ((current.domain != null && old.domain == null) ||
                (current.domain == null && old.domain != null) ||
                (current.domain != null && old.domain != null &&
                 !current.domain.regionMatches(true, 0, old.domain, 0,
View Full Code Here

        if (url == null) {
            return null;
        }

        /* this will parse any kind of URL, not only Http */
        HttpUrl parsedUrl = new HttpUrl(url);

        if (parsedUrl.scheme == null) {
            return defaultScheme;
        }

View Full Code Here

        if (url == null) {
            return null;
        }

        /* this will parse any kind of URL, not only Http */
        HttpUrl parsedUrl = new HttpUrl(url);
        String path = parsedUrl.path;

        /*
           IMPL_NOTE: In current implementation of HttpUrl
               the absolute path always begins with '/' which
View Full Code Here

    public Connection openPrim(SecurityToken token, String fullUrl)
            throws IOException, IllegalArgumentException,
            ConnectionNotFoundException {

        checkIfPermissionAllowed(token);
        return open(new HttpUrl(fullUrl), Connector.READ_WRITE);
    }
View Full Code Here

    public Connection openPrim(String name, int mode, boolean timeouts)
            throws IOException, IllegalArgumentException,
            ConnectionNotFoundException {

        checkForPermission(name);
        return open(new HttpUrl(protocol, name), mode);
    }
View Full Code Here

        /*
         * parse name into host and port
         */
  String addr = dmsg.getAddress();
        HttpUrl url = new HttpUrl(addr);
        if (url.port == -1) {
            /* no port supplied */
            url.port = 0;
        }

View Full Code Here

TOP

Related Classes of com.sun.midp.io.HttpUrl

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.