Search in sources :

Example 1 with XarPackage

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);
}
Also used : XarPackage(org.xwiki.xar.XarPackage)

Aggregations

XarPackage (org.xwiki.xar.XarPackage)1