本文整理汇总了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;
}
}
示例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;
}
}
示例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));
}
示例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));
}