use of org.xwiki.xar.XarPackage in project xwiki-platform by xwiki.
the class ImportAction method getPackageInfos.
private void getPackageInfos(XWikiAttachment packFile, XWikiResponse response, XWikiContext xcontext) throws IOException, XWikiException, XarException {
String encoding = xcontext.getWiki().getEncoding();
response.setContentType(MediaType.APPLICATION_XML.toString());
response.setCharacterEncoding(encoding);
XarPackage xarPackage = new XarPackage(packFile.getContentInputStream(xcontext));
xarPackage.write(response.getOutputStream(), encoding);
}
Aggregations