< prev index next >

src/java.xml/share/classes/javax/xml/stream/XMLEventWriter.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
*** 48,64 **** */ public interface XMLEventWriter extends XMLEventConsumer { /** * Writes any cached events to the underlying output mechanism ! * @throws XMLStreamException */ public void flush() throws XMLStreamException; /** * Frees any resources associated with this stream ! * @throws XMLStreamException */ public void close() throws XMLStreamException; /** * Add an event to the output stream --- 48,64 ---- */ public interface XMLEventWriter extends XMLEventConsumer { /** * Writes any cached events to the underlying output mechanism ! * @throws XMLStreamException if an error occurs */ public void flush() throws XMLStreamException; /** * Frees any resources associated with this stream ! * @throws XMLStreamException if an error occurs */ public void close() throws XMLStreamException; /** * Add an event to the output stream
*** 178,188 **** * <td> The DocumentTypeDefinition is written to the output </td> * </tr> * </tbody> * </table> * @param event the event to be added ! * @throws XMLStreamException */ public void add(XMLEvent event) throws XMLStreamException; /** * Adds an entire stream to an output stream, --- 178,188 ---- * <td> The DocumentTypeDefinition is written to the output </td> * </tr> * </tbody> * </table> * @param event the event to be added ! * @throws XMLStreamException if an error occurs */ public void add(XMLEvent event) throws XMLStreamException; /** * Adds an entire stream to an output stream,
*** 190,230 **** * This should be treated as a convenience method that will * perform the following loop over all the events in an * event reader and call add on each event. * * @param reader the event stream to add to the output ! * @throws XMLStreamException */ public void add(XMLEventReader reader) throws XMLStreamException; /** * Gets the prefix the uri is bound to * @param uri the uri to look up ! * @throws XMLStreamException */ public String getPrefix(String uri) throws XMLStreamException; /** * Sets the prefix the uri is bound to. This prefix is bound * in the scope of the current START_ELEMENT / END_ELEMENT pair. * If this method is called before a START_ELEMENT has been written * the prefix is bound in the root scope. * @param prefix the prefix to bind to the uri * @param uri the uri to bind to the prefix ! * @throws XMLStreamException */ public void setPrefix(String prefix, String uri) throws XMLStreamException; /** * Binds a URI to the default namespace * This URI is bound * in the scope of the current START_ELEMENT / END_ELEMENT pair. * If this method is called before a START_ELEMENT has been written * the uri is bound in the root scope. * @param uri the uri to bind to the default namespace ! * @throws XMLStreamException */ public void setDefaultNamespace(String uri) throws XMLStreamException; /** * Sets the current namespace context for prefix and uri bindings. --- 190,231 ---- * This should be treated as a convenience method that will * perform the following loop over all the events in an * event reader and call add on each event. * * @param reader the event stream to add to the output ! * @throws XMLStreamException if an error occurs */ public void add(XMLEventReader reader) throws XMLStreamException; /** * Gets the prefix the uri is bound to * @param uri the uri to look up ! * @return the prefix ! * @throws XMLStreamException if an error occurs */ public String getPrefix(String uri) throws XMLStreamException; /** * Sets the prefix the uri is bound to. This prefix is bound * in the scope of the current START_ELEMENT / END_ELEMENT pair. * If this method is called before a START_ELEMENT has been written * the prefix is bound in the root scope. * @param prefix the prefix to bind to the uri * @param uri the uri to bind to the prefix ! * @throws XMLStreamException if an error occurs */ public void setPrefix(String prefix, String uri) throws XMLStreamException; /** * Binds a URI to the default namespace * This URI is bound * in the scope of the current START_ELEMENT / END_ELEMENT pair. * If this method is called before a START_ELEMENT has been written * the uri is bound in the root scope. * @param uri the uri to bind to the default namespace ! * @throws XMLStreamException if an error occurs */ public void setDefaultNamespace(String uri) throws XMLStreamException; /** * Sets the current namespace context for prefix and uri bindings.
*** 232,242 **** * will replace the current root namespace context. Subsequent calls * to setPrefix and setDefaultNamespace will bind namespaces using * the context passed to the method as the root context for resolving * namespaces. * @param context the namespace context to use for this writer ! * @throws XMLStreamException */ public void setNamespaceContext(NamespaceContext context) throws XMLStreamException; /** --- 233,243 ---- * will replace the current root namespace context. Subsequent calls * to setPrefix and setDefaultNamespace will bind namespaces using * the context passed to the method as the root context for resolving * namespaces. * @param context the namespace context to use for this writer ! * @throws XMLStreamException if an error occurs */ public void setNamespaceContext(NamespaceContext context) throws XMLStreamException; /**
< prev index next >