< prev index next >

src/java.xml/share/classes/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java

Print this page




  31 import java.io.OutputStream;
  32 import java.io.Writer;
  33 
  34 import javax.xml.stream.XMLOutputFactory ;
  35 import javax.xml.stream.XMLStreamException;
  36 import javax.xml.transform.Result;
  37 import javax.xml.transform.dom.DOMResult;
  38 import javax.xml.transform.stream.StreamResult;
  39 import javax.xml.transform.stax.StAXResult;
  40 import com.sun.org.apache.xerces.internal.impl.Constants;
  41 import com.sun.org.apache.xerces.internal.impl.PropertyManager;
  42 
  43 import com.sun.xml.internal.stream.writers.XMLDOMWriterImpl;
  44 import com.sun.xml.internal.stream.writers.XMLEventWriterImpl;
  45 import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl;
  46 
  47 /**
  48  * This class provides the implementation of XMLOutputFactory.
  49  *
  50  * @author  Neeraj Bajaj,
  51  * @author k.venugopal@sun.com
  52  */
  53 public class XMLOutputFactoryImpl extends XMLOutputFactory {
  54 
  55     //List of supported properties and default values.
  56     private PropertyManager fPropertyManager = new PropertyManager(PropertyManager.CONTEXT_WRITER);
  57 
  58     //cache the instance of XMLStreamWriterImpl
  59     private XMLStreamWriterImpl fStreamWriter = null;
  60 
  61     /**
  62      * TODO: at the current time, XMLStreamWriters are not Thread safe.
  63      */
  64     boolean fReuseInstance = false;
  65 
  66     /** Creates a new instance of XMLOutputFactory */
  67     public XMLOutputFactoryImpl() {
  68     }
  69 
  70     public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream outputStream) throws javax.xml.stream.XMLStreamException {
  71         return createXMLEventWriter(outputStream,  null);




  31 import java.io.OutputStream;
  32 import java.io.Writer;
  33 
  34 import javax.xml.stream.XMLOutputFactory ;
  35 import javax.xml.stream.XMLStreamException;
  36 import javax.xml.transform.Result;
  37 import javax.xml.transform.dom.DOMResult;
  38 import javax.xml.transform.stream.StreamResult;
  39 import javax.xml.transform.stax.StAXResult;
  40 import com.sun.org.apache.xerces.internal.impl.Constants;
  41 import com.sun.org.apache.xerces.internal.impl.PropertyManager;
  42 
  43 import com.sun.xml.internal.stream.writers.XMLDOMWriterImpl;
  44 import com.sun.xml.internal.stream.writers.XMLEventWriterImpl;
  45 import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl;
  46 
  47 /**
  48  * This class provides the implementation of XMLOutputFactory.
  49  *
  50  * @author  Neeraj Bajaj,
  51  * @author k venugopal
  52  */
  53 public class XMLOutputFactoryImpl extends XMLOutputFactory {
  54 
  55     //List of supported properties and default values.
  56     private PropertyManager fPropertyManager = new PropertyManager(PropertyManager.CONTEXT_WRITER);
  57 
  58     //cache the instance of XMLStreamWriterImpl
  59     private XMLStreamWriterImpl fStreamWriter = null;
  60 
  61     /**
  62      * TODO: at the current time, XMLStreamWriters are not Thread safe.
  63      */
  64     boolean fReuseInstance = false;
  65 
  66     /** Creates a new instance of XMLOutputFactory */
  67     public XMLOutputFactoryImpl() {
  68     }
  69 
  70     public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream outputStream) throws javax.xml.stream.XMLStreamException {
  71         return createXMLEventWriter(outputStream,  null);


< prev index next >