您的位置:首页 > 其它

How to extract data from ContentHolder in Windc...

2013-03-20 00:00 633 查看
public static String extractContent(ContentHolder contentHolder, String location, ContentRoleType contentRoleType) throws Exception {
contentHolder = ContentHelper.service.getContents(contentHolder);
QueryResult contents = ContentHelper.service.getContentsByRole(contentHolder, contentRoleType);
ApplicationData applicationdata = ((ApplicationData)contents.nextElement());   //It is assumed that there is a content else error
String filePath = location + "/" + applicationdata.getFileName();
ContentServerHelper.service.writeContentStream(applicationdata, filePath);
return filePath;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐