- /** Writes the object and CLOSES the stream. Uses the persistence delegate registered in this class.
- * @param os The stream to write to. Will be closed.
- * @param o The object to be serialized.
- * @param listener The listener to receive the exceptions if there are any. If <code>null</code> not used.
- */
- static void writeXMLObject(OutputStream os, Object o, ExceptionListener listener)
- {
- ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(LayoutUtil.class.getClassLoader());
-
- XMLEncoder encoder = new XMLEncoder(os);
-
- if (listener != null)
- encoder.setExceptionListener(listener);
-
- encoder.writeObject(o);
- encoder.close(); // Must be closed to write.
-
- Thread.currentThread().setContextClassLoader(oldClassLoader);
- }
+// /** Writes the object and CLOSES the stream. Uses the persistence delegate registered in this class.
+// * @param os The stream to write to. Will be closed.
+// * @param o The object to be serialized.
+// * @param listener The listener to receive the exceptions if there are any. If <code>null</code> not used.
+// */
+// static void writeXMLObject(OutputStream os, Object o, ExceptionListener listener)
+// {
+// ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
+// Thread.currentThread().setContextClassLoader(LayoutUtil.class.getClassLoader());
+//
+// XMLEncoder encoder = new XMLEncoder(os);
+//
+// if (listener != null)
+// encoder.setExceptionListener(listener);
+//
+// encoder.writeObject(o);
+// encoder.close(); // Must be closed to write.
+//
+// Thread.currentThread().setContextClassLoader(oldClassLoader);
+// }