Question & Answer
Question
What technology/algorithm does Sterling Application (Platform, Foundation) use for XML Compression?
Answer
1. In the platform, for handling XMLs in the Configurator, Sterling uses ZIP format for compression by invoking 'ZipOutputStream.class' of java.util.zip.
Below sample code snippet can be used for reference:
protected void serializeDocument (YFCDocument doc, HttpServletResponse resp, boolean compressData) throws IOException {
if (!compressData) {
doc.serialize(resp.getOutputStream());
} else {
resp.setHeader("YFC-IsCompressed","true");
ZipOutputStream out = new ZipOutputStream(resp.getOutputStream());
ZipEntry entry = new ZipEntry("YFCData.xml");
out.putNextEntry(entry);
doc.serialize(out);
out.closeEntry();
out.flush();
out.close();
}
For more information on the BytesMessage, please refer to (http://java.sun.com/products/jms/javadoc-102a/index.html).
There is no explicit compression done by Sterling other than above here.
Historical Number
FAQ3197
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21519054