hi all ,
i'm new to input/output streams and i'm very stuck
I'm using jdom to return a db recordset and format it as xml, like this
.......
RecordsetToXML rsXML = new RecordsetToXML(rs, "root", "record");
// create the XML from recordset
Document jDOMDoc = rsXML.build();
XMLOutputter outputter = new XMLOutputter();
outputter.output(jDOMDoc, writer);
result = writer.toString();
........
where result is the recordset from a db query formatted as xml
i now want to use gzip to compress the 'result'. I have this (http://javaalmanac.com/egs/java.util.zip/CompressFile.html) link but i'm confused how i pass the 'result' to the gzip method.
can anyone help me please
thanks for any help
i'm new to input/output streams and i'm very stuck
I'm using jdom to return a db recordset and format it as xml, like this
.......
RecordsetToXML rsXML = new RecordsetToXML(rs, "root", "record");
// create the XML from recordset
Document jDOMDoc = rsXML.build();
XMLOutputter outputter = new XMLOutputter();
outputter.output(jDOMDoc, writer);
result = writer.toString();
........
where result is the recordset from a db query formatted as xml
i now want to use gzip to compress the 'result'. I have this (http://javaalmanac.com/egs/java.util.zip/CompressFile.html) link but i'm confused how i pass the 'result' to the gzip method.
can anyone help me please
thanks for any help