001    /*
002     **
003     ** Licensed to the Apache Software Foundation (ASF) under one
004     ** or more contributor license agreements.  See the NOTICE file
005     ** distributed with this work for additional information
006     ** regarding copyright ownership.  The ASF licenses this file
007     ** to you under the Apache License, Version 2.0 (the
008     ** "License"); you may not use this file except in compliance
009     ** with the License.  You may obtain a copy of the License at
010     **
011     **  http://www.apache.org/licenses/LICENSE-2.0
012     **
013     ** Unless required by applicable law or agreed to in writing,
014     ** software distributed under the License is distributed on an
015     ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016     ** KIND, either express or implied.  See the License for the
017     ** specific language governing permissions and limitations
018     ** under the License.
019     */
020    package javax.xml.stream;
021    
022    import javax.xml.namespace.NamespaceContext;
023    
024    public interface XMLStreamWriter {
025            public void close() throws XMLStreamException;
026    
027            public void flush() throws XMLStreamException;
028    
029            public NamespaceContext getNamespaceContext();
030    
031            public String getPrefix(String uri) throws XMLStreamException;
032    
033            public Object getProperty(String name) throws IllegalArgumentException;
034    
035            public void setDefaultNamespace(String uri) throws XMLStreamException;
036    
037            public void setNamespaceContext(NamespaceContext context)
038                            throws XMLStreamException;
039    
040            public void setPrefix(String prefix, String uri) throws XMLStreamException;
041    
042            public void writeAttribute(String localName, String value)
043                            throws XMLStreamException;
044    
045            public void writeAttribute(String namespaceURI, String localName,
046                            String value) throws XMLStreamException;
047    
048            public void writeAttribute(String prefix, String namespaceURI,
049                            String localName, String value) throws XMLStreamException;
050    
051            public void writeCData(String data) throws XMLStreamException;
052    
053            public void writeCharacters(char[] text, int start, int len)
054                            throws XMLStreamException;
055    
056            public void writeCharacters(String text) throws XMLStreamException;
057    
058            public void writeComment(String data) throws XMLStreamException;
059    
060            public void writeDefaultNamespace(String namespaceURI)
061                            throws XMLStreamException;
062    
063            public void writeDTD(String dtd) throws XMLStreamException;
064    
065            public void writeEmptyElement(String localName) throws XMLStreamException;
066    
067            public void writeEmptyElement(String namespaceURI, String localName)
068                            throws XMLStreamException;
069    
070            public void writeEmptyElement(String prefix, String localName,
071                            String namespaceURI) throws XMLStreamException;
072    
073            public void writeEndDocument() throws XMLStreamException;
074    
075            public void writeEndElement() throws XMLStreamException;
076    
077            public void writeEntityRef(String name) throws XMLStreamException;
078    
079            public void writeNamespace(String prefix, String namespaceURI)
080                            throws XMLStreamException;
081    
082            public void writeProcessingInstruction(String target)
083                            throws XMLStreamException;
084    
085            public void writeProcessingInstruction(String target, String data)
086                            throws XMLStreamException;
087    
088            public void writeStartDocument() throws XMLStreamException;
089    
090            public void writeStartDocument(String version) throws XMLStreamException;
091    
092            public void writeStartDocument(String encoding, String version)
093                            throws XMLStreamException;
094    
095            public void writeStartElement(String localName) throws XMLStreamException;
096    
097            public void writeStartElement(String namespaceURI, String localName)
098                            throws XMLStreamException;
099    
100            public void writeStartElement(String prefix, String localName,
101                            String namespaceURI) throws XMLStreamException;
102    }