Package org.apache.commons.vfs.provider

Examples of org.apache.commons.vfs.provider.URLFileName


     */
    private void setDavResource(WebdavResource resource) throws Exception
    {
        redirectionResolved = false;

        final URLFileName name = (URLFileName) getName();

        if (resource == null)
        {
            // HttpURL url = new HttpURL(name.getHostName(), name.getPort(), name.getPath());
            String pathEncoded = name.getPathQueryEncoded(urlCharset);
            HttpURL url = new HttpURL(name.getUserName(), name.getPassword(), name.getHostName(), name.getPort());
            url.setEscapedPath(pathEncoded);
            resource = new WebdavResource(fileSystem.getClient())
            {
            };
            resource.setHttpURL(url, WebdavResource.NOACTION, 1);
        }

        this.resource = resource;

        // if (bCheckExists)
        {
            /* now fill the dav properties */
            String pathEncoded = name.getPathQueryEncoded(urlCharset);
            final OptionsMethod optionsMethod = new OptionsMethod(pathEncoded);
            try
            {
                optionsMethod.setFollowRedirects(true);
                final int status = fileSystem.getClient().executeMethod(optionsMethod);
View Full Code Here


    protected URL createURL(final FileName name) throws MalformedURLException, FileSystemException, URIException
    {
        if (name instanceof URLFileName)
        {
            URLFileName urlName = (URLFileName) getName();

            // TODO: charset
            return new URL(urlName.getURIEncoded(null));
        }
        return new URL(getName().getURI());
    }
View Full Code Here

    protected URL createURL(final FileName name) throws MalformedURLException, FileSystemException, URIException
    {
        if (name instanceof URLFileName)
        {
            URLFileName urlName = (URLFileName) getName();

            // TODO: charset
            return new URL(urlName.getURIEncoded(null));
        }
        return new URL(getName().getURI());
    }
View Full Code Here

    protected URL createURL(final FileName name) throws MalformedURLException, FileSystemException, URIException
    {
        String url;
        if (name instanceof URLFileName)
        {
            URLFileName urlName = (URLFileName) getName();

            // TODO: charset
            url = urlName.getURIEncoded(null);
        }
        else
        {
            url = getName().getURI();
        }
View Full Code Here

    private void setDavResource(WebdavResource resource) throws Exception
    {
     
        redirectionResolved = false;

        final URLFileName name = (URLFileName) getName();

        if (resource == null)
        {
            // HttpURL url = new HttpURL(name.getHostName(), name.getPort(), name.getPath());
            String pathEncoded = name.getPathQueryEncoded(urlCharset);
            HttpURL url = new HttpURL(name.getUserName(), name.getPassword(), name.getHostName(), name.getPort());
            url.setEscapedPath(pathEncoded);
            resource = new WebdavResource(fileSystem.getClient())
            {
            };
            resource.setHttpURL(url, WebdavResource.NOACTION, 1);
        }

        this.resource = resource;

        // if (bCheckExists)
        {
            /* now fill the dav properties */
            String pathEncoded = name.getPathQueryEncoded(urlCharset);
           
           // We only execute the options method in order to
           // setAllowedMethods. Haven't looked to see how important doing that is.
           
           // Existence is determined separately (see existsTest).
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.provider.URLFileName

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.