本文整理汇总了Java中org.apache.commons.vfs2.provider.UriParser.encode方法的典型用法代码示例。如果您正苦于以下问题:Java UriParser.encode方法的具体用法?Java UriParser.encode怎么用?Java UriParser.encode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.vfs2.provider.UriParser
的用法示例。
在下文中一共展示了UriParser.encode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doListChildren
import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/**
* Lists the children of the file.
*
* @return the string[]
*
* @throws Exception the exception
*/
@Override
protected String[] doListChildren() throws Exception {
// List the children of this file
doGetChildren();
final String[] childNames = new String[children.size()];
int childNum = -1;
Iterator<FileInfo> iterChildren = children.values().iterator();
while (iterChildren.hasNext()) {
childNum++;
final FileInfo child = iterChildren.next();
childNames[childNum] = child.getName();
}
return UriParser.encode(childNames);
}
示例2: doListChildren
import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/**
* Lists the children of the file. Is only called if {@link #doGetType}
* returns {@link FileType#FOLDER}.
*/
@Override
protected String[] doListChildren() throws Exception
{
// VFS-210: do not try to get listing for anything else than directories
if (!file.isDirectory())
{
return null;
}
return UriParser.encode(file.list());
}
示例3: doListChildren
import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/**
* Lists the children of the file.
*/
@Override
protected String[] doListChildren()
throws Exception
{
// List the children of this file
doGetChildren();
// VFS-210
if (children == null)
{
return null;
}
// TODO - get rid of this children stuff
final String[] childNames = new String[children.size()];
int childNum = -1;
Iterator<FTPFile> iterChildren = children.values().iterator();
while (iterChildren.hasNext())
{
childNum++;
final FTPFile child = iterChildren.next();
childNames[childNum] = child.getName();
}
return UriParser.encode(childNames);
}
示例4: doListChildren
import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/**
* Returns the children of the file.
*/
@Override
protected String[] doListChildren() throws Exception
{
return UriParser.encode(file.list());
}
示例5: doListChildren
import org.apache.commons.vfs2.provider.UriParser; //导入方法依赖的package包/类
/** Returns the children of the file. */
@Override
protected String[] doListChildren() throws Exception {
return UriParser.encode(file.list());
}