< prev index next >

src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 110,119 **** --- 110,123 ---- public static final String IS_REPAIRING_NAMESPACES= "javax.xml.stream.isRepairingNamespaces"; static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl"; + /** + * Protected constructor to prevent instantiation. + * Use {@link #newFactory()} instead. + */ protected XMLOutputFactory(){} /** * Creates a new instance of the {@code XMLOutputFactory} builtin * system-default implementation.
*** 128,137 **** --- 132,142 ---- } /** * Creates a new instance of the factory in exactly the same manner as the * {@link #newFactory()} method. + * @return an instance of the {@code XMLOutputFactory} * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ public static XMLOutputFactory newInstance() throws FactoryConfigurationError {
*** 188,197 **** --- 193,203 ---- * </ul> * <p> * Once an application has obtained a reference to a XMLOutputFactory it * can use the factory to configure and obtain stream instances. * + * @return an instance of the {@code XMLOutputFactory} * @throws FactoryConfigurationError in case of {@linkplain * java.util.ServiceConfigurationError service configuration error} or if * the implementation is not available or cannot be instantiated. */ public static XMLOutputFactory newFactory()
*** 300,370 **** } /** * Create a new XMLStreamWriter that writes to a writer * @param stream the writer to write to ! * @throws XMLStreamException */ public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException; /** * Create a new XMLStreamWriter that writes to a stream * @param stream the stream to write to ! * @throws XMLStreamException */ public abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream) throws XMLStreamException; /** * Create a new XMLStreamWriter that writes to a stream * @param stream the stream to write to * @param encoding the encoding to use ! * @throws XMLStreamException */ public abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream, String encoding) throws XMLStreamException; /** * Create a new XMLStreamWriter that writes to a JAXP result. This method is optional. * @param result the result to write to * @throws UnsupportedOperationException if this method is not * supported by this XMLOutputFactory ! * @throws XMLStreamException */ public abstract XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a JAXP result. This method is optional. * @param result the result to write to * @throws UnsupportedOperationException if this method is not * supported by this XMLOutputFactory ! * @throws XMLStreamException */ public abstract XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a stream * @param stream the stream to write to ! * @throws XMLStreamException */ public abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a stream * @param stream the stream to write to * @param encoding the encoding to use ! * @throws XMLStreamException */ public abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream, String encoding) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a writer * @param stream the stream to write to ! * @throws XMLStreamException */ public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException; /** * Allows the user to set specific features/properties on the underlying implementation. --- 306,384 ---- } /** * Create a new XMLStreamWriter that writes to a writer * @param stream the writer to write to ! * @return instance of the {@code XMLStreamWriter} ! * @throws XMLStreamException if an error occurs */ public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException; /** * Create a new XMLStreamWriter that writes to a stream * @param stream the stream to write to ! * @return instance of the {@code XMLStreamWriter} ! * @throws XMLStreamException if an error occurs */ public abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream) throws XMLStreamException; /** * Create a new XMLStreamWriter that writes to a stream * @param stream the stream to write to * @param encoding the encoding to use ! * @return instance of the {@code XMLStreamWriter} ! * @throws XMLStreamException if an error occurs */ public abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream, String encoding) throws XMLStreamException; /** * Create a new XMLStreamWriter that writes to a JAXP result. This method is optional. * @param result the result to write to + * @return instance of the {@code XMLStreamWriter} * @throws UnsupportedOperationException if this method is not * supported by this XMLOutputFactory ! * @throws XMLStreamException if an error occurs */ public abstract XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a JAXP result. This method is optional. * @param result the result to write to + * @return instance of the {@code XMLEventWriter} * @throws UnsupportedOperationException if this method is not * supported by this XMLOutputFactory ! * @throws XMLStreamException if an error occurs */ public abstract XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a stream * @param stream the stream to write to ! * @return instance of the {@code XMLEventWriter} ! * @throws XMLStreamException if an error occurs */ public abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a stream * @param stream the stream to write to * @param encoding the encoding to use ! * @return instance of the {@code XMLEventWriter} ! * @throws XMLStreamException if an error occurs */ public abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream, String encoding) throws XMLStreamException; /** * Create a new XMLEventWriter that writes to a writer * @param stream the stream to write to ! * @return instance of the {@code XMLEventWriter} ! * @throws XMLStreamException if an error occurs */ public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException; /** * Allows the user to set specific features/properties on the underlying implementation.
< prev index next >