当前位置: 首页>>代码示例>>Java>>正文


Java UriParser.decode方法代码示例

本文整理汇总了Java中org.apache.commons.vfs2.provider.UriParser.decode方法的典型用法代码示例。如果您正苦于以下问题:Java UriParser.decode方法的具体用法?Java UriParser.decode怎么用?Java UriParser.decode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.vfs2.provider.UriParser的用法示例。


在下文中一共展示了UriParser.decode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FtpFileObject

import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
protected FtpFileObject(final AbstractFileName name,
                        final FtpFileSystem fileSystem,
                        final FileName rootName)
    throws FileSystemException
{
    super(name, fileSystem);
    ftpFs = fileSystem;
    String relPath = UriParser.decode(rootName.getRelativeName(name));
    if (".".equals(relPath))
    {
        // do not use the "." as path against the ftp-server
        // e.g. the uu.net ftp-server do a recursive listing then
        // this.relPath = UriParser.decode(rootName.getPath());
        // this.relPath = ".";
        this.relPath = null;
    }
    else
    {
        this.relPath = relPath;
    }
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:22,代码来源:FtpFileObject.java

示例2: GsiFtpFileObject

import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/**
 * Instantiates a new gsi ftp file object.
 * 
 * @param name the name
 * @param fileSystem the file system
 * @param rootName the root name
 * 
 * @throws FileSystemException the file system exception
 */
protected GsiFtpFileObject(final AbstractFileName name, final GsiFtpFileSystem fileSystem, final FileName rootName) throws FileSystemException {
    super(name, fileSystem);
    ftpFs = fileSystem;
    String relPathTmp = UriParser.decode(rootName.getRelativeName(name));

    // log.debug("FileName=" + name + " Root=" + rootName
    // + " Relative path=" + relPath );

    if (".".equals(relPathTmp)) {
        // do not use the "." as path against the ftp-server
        // e.g. the uu.net ftp-server do a recursive listing then
        // this.relPath = UriParser.decode(rootName.getPath());
        // this.relPath = ".";
        // boolean ok = true;
        // try {
        // cwd = ftpFs.getClient().getCurrentDir();
        // }
        // catch (ServerException se) { ok = false;}
        // catch (IOException se) { ok = false;}

        // if ( ! ok ) {
        // throw new FileSystemException("vfs.provider.gsiftp/get-type.error", getName());
        // }
        this.relPath = "/"; // cwd;
    } else {
        this.relPath = relPathTmp;
    }
}
 
开发者ID:clstoulouse,项目名称:motu,代码行数:38,代码来源:GsiFtpFileObject.java

示例3: SftpFileObject

import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
protected SftpFileObject(final AbstractFileName name,
        final SftpFileSystem fileSystem) throws FileSystemException
{
    super(name, fileSystem);
    this.fileSystem = fileSystem;
    relPath = UriParser.decode(fileSystem.getRootName().getRelativeName(
            name));
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:9,代码来源:SftpFileObject.java

示例4: createFile

import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/**
 * create the temporary file
 * @param parent The file to use as the parent of the file being created.
 * @param name The name of the file to create.
 * @return The File that was created.
 * @throws FileSystemException if an error occurs creating the file.
 */
protected File createFile(final File parent, final String name) throws FileSystemException
{
    return new File(parent, UriParser.decode(name));
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:12,代码来源:DefaultFileReplicator.java


注:本文中的org.apache.commons.vfs2.provider.UriParser.decode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。