Package org.apache.util

Examples of org.apache.util.HttpURL


     * @see #setPath(java.lang.String)
     */
    public void setHttpURL(HttpURL httpURL, String additionalPath)
        throws HttpException, IOException {
       
        setHttpURL(new HttpURL(httpURL, additionalPath),
                   defaultAction, defaultDepth);
    }
View Full Code Here


     * @see #setPath(java.lang.String)
     */
    public void setHttpURL(String escapedHttpURL)
        throws HttpException, IOException {
       
        setHttpURL(new HttpURL(escapedHttpURL));
    }
View Full Code Here

     * @return the value 0 if the argument is equal.
     */
    public int compareToWebdavResource(WebdavResource another) {
       
        try {
            HttpURL anotherUrl = another.getHttpURL();
           
            String thisHost = httpURL.getHost();
            String anotherHost= anotherUrl.getHost();
            if (!thisHost.equalsIgnoreCase(anotherHost))
                return thisHost.compareTo(anotherHost);
           
            int thisPort = httpURL.getPort();
            int anotherPort= anotherUrl.getPort();
            if (thisPort != anotherPort)
                return (thisPort < anotherPort) ? -1 : 1;
           
            boolean thisCollection = isCollection();
            boolean anotherCollection = another.isCollection();
            if (thisCollection && !anotherCollection)
                return -1;
            if (anotherCollection && !thisCollection)
                return 1;
           
            String thisPath = httpURL.getPathQuery();
            String anotherPath= anotherUrl.getPathQuery();
            return thisPath.compareTo(anotherPath);
        } catch (Exception e) {
            // FIXME: not to return 0.
        }
       
View Full Code Here

        this.protocol = protocol;
       
        this.systemId = "http://" + location;
       
        //try {
            HttpURL httpURL = new HttpURL(this.systemId);
            httpURL.setUserInfo(principal, password);
           
            if (createNew)
               this.resource = new WebdavResource(httpURL,
                   WebdavResource.NOACTION,
                   DepthSupport.DEPTH_1);
View Full Code Here

    public void setSourceCredential(SourceCredential sourcecredential)
        throws SourceException {
        this.sourcecredential = sourcecredential;

        try {
            HttpURL httpURL = new HttpURL(this.systemId);
            httpURL.setUserInfo(
                sourcecredential.getPrincipal(),
                sourcecredential.getPassword());
            this.resource = new WebdavResource(httpURL);
        } catch (HttpException he) {
            throw new SourceException("Could not set credentials", he);
View Full Code Here

TOP

Related Classes of org.apache.util.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.