XMLHelper xmlHelperLocal = xmlHelper;
if(objectOutput instanceof SDOObjectInputStream)
{
xmlHelperLocal = ((SDOObjectInputStream)objectOutput).getHelperContext().getXMLHelper();
}
xmlHelperLocal.save(dataObject, "commonj.sdo", "dataObject", gzipOutputStream);
gzipOutputStream.close(); // Flush the contents
byte[] byteArray = compressedByteArrayOutputStream.toByteArray();
objectOutput.writeInt(byteArray.length);
objectOutput.write(byteArray);