1 // $Id: XmlSerializer.java,v 1.2 2004/02/12 22:57:34 powerpete Exp $
2 // [JMP, 06.02.2004] Created this file.
3 package org.jface.stepmt.transform.xml;
4
5 import java.io.IOException;
6 import java.io.OutputStream;
7
8 import org.apache.commons.logging.Log;
9 import org.apache.commons.logging.LogFactory;
10 import org.jface.stepmt.transform.Serializer;
11 import org.jface.stepmt.transform.util.SerializerUtils;
12 import org.xml.sax.ContentHandler;
13
14 /***
15 * @author <a href="mailto:powerpete@users.sf.net">M. Petersen</a>
16 * @version $Id: XmlSerializer.java,v 1.2 2004/02/12 22:57:34 powerpete Exp $
17 */
18 public class XmlSerializer implements Serializer
19 {
20 private static final Log LOG = LogFactory.getLog(XmlSerializer.class);
21 private OutputStream out;
22
23 public void setOutputStream(OutputStream out)
24 {
25 this.out = out;
26 }
27
28 public ContentHandler getConsumer()
29 {
30 try
31 {
32 return SerializerUtils.getContentHandler("xml", out);
33 }
34 catch (IOException e)
35 {
36 LOG.fatal("Error while creating ContentHandler.", e);
37 return null;
38 }
39 }
40 }
This page was automatically generated by Maven