本文整理汇总了Java中org.apache.jackrabbit.webdav.client.methods.PropFindMethod类的典型用法代码示例。如果您正苦于以下问题:Java PropFindMethod类的具体用法?Java PropFindMethod怎么用?Java PropFindMethod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropFindMethod类属于org.apache.jackrabbit.webdav.client.methods包,在下文中一共展示了PropFindMethod类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProperties
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod; //导入依赖的package包/类
DavPropertySet getProperties(URLFileName name, int type, DavPropertyNameSet nameSet,
boolean addEncoding)
throws FileSystemException
{
try
{
String urlStr = urlString(name);
PropFindMethod method = new PropFindMethod(urlStr, type, nameSet, DavConstants.DEPTH_0);
setupMethod(method);
execute(method);
if (method.succeeded())
{
MultiStatus multiStatus = method.getResponseBodyAsMultiStatus();
MultiStatusResponse response = multiStatus.getResponses()[0];
DavPropertySet props = response.getProperties(HttpStatus.SC_OK);
if (addEncoding)
{
DavProperty prop = new DefaultDavProperty(RESPONSE_CHARSET,
method.getResponseCharSet());
props.add(prop);
}
return props;
}
return new DavPropertySet();
}
catch (FileSystemException fse)
{
throw fse;
}
catch (Exception e)
{
throw new FileSystemException("vfs.provider.webdav/propfind.error", getName(), e);
}
}
示例2: getPropertyNames
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod; //导入依赖的package包/类
DavPropertySet getPropertyNames(URLFileName name) throws FileSystemException
{
return getProperties(name, PropFindMethod.PROPFIND_PROPERTY_NAMES,
new DavPropertyNameSet(), false);
}