*/
class CompressedObjectCodec implements Codec {
public Node encode(Object object, Document doc) throws DOMException {
ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
try {
Base64EncodingOutputStream base64 = new Base64EncodingOutputStream(byteArray);
GZIPOutputStream gzip = new GZIPOutputStream(base64);
ObjectOutputStream objStream = new ObjectOutputStream(gzip);
objStream.writeObject(object);
objStream.close();
} catch (IOException cantHappen) {}