jdk/src/java.base/share/classes/jdk/internal/util/xml/XMLStreamWriter.java
author martin
Thu, 30 Oct 2014 07:31:41 -0700
changeset 28059 e576535359cc
parent 25859 3317bb8137f4
child 32649 2ee9017c7597
permissions -rw-r--r--
8067377: My hobby: caning, then then canning, the the can-can Summary: Fix ALL the stutters! Reviewed-by: rriggs, mchung, lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14908
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     1
/*
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     4
 *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    10
 *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    15
 * accompanied this code).
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    16
 *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    20
 *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    23
 * questions.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    24
 */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    25
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    26
package jdk.internal.util.xml;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    27
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    28
/**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    29
 * Basic XMLStreamWriter for writing simple XML files such as those
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    30
 * defined in java.util.Properties
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    31
 *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    32
 * This is a subset of javax.xml.stream.XMLStreamWriter
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    33
 *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    34
 * @author Joe Wang
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    35
 */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    36
public  interface XMLStreamWriter {
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    37
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    38
    //Defaults the XML version to 1.0, and the encoding to utf-8
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    39
    public final static String DEFAULT_XML_VERSION = "1.0";
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    40
    public final static String DEFAULT_ENCODING = "UTF-8";
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    41
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    42
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    43
     * Writes a start tag to the output.  All writeStartElement methods
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    44
     * open a new scope in the internal namespace context.  Writing the
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    45
     * corresponding EndElement causes the scope to be closed.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    46
     * @param localName local name of the tag, may not be null
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    47
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    48
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    49
    public void writeStartElement(String localName) throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    50
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    51
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    52
     * Writes an empty element tag to the output
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    53
     * @param localName local name of the tag, may not be null
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    54
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    55
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    56
    public void writeEmptyElement(String localName) throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    57
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    58
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    59
     * Writes an end tag to the output relying on the internal
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    60
     * state of the writer to determine the prefix and local name
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    61
     * of the event.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    62
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    63
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    64
    public void writeEndElement() throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    65
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    66
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    67
     * Closes any start tags and writes corresponding end tags.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    68
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    69
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    70
    public void writeEndDocument() throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    71
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    72
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    73
     * Close this writer and free any resources associated with the
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    74
     * writer.  This must not close the underlying output stream.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    75
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    76
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    77
    public void close() throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    78
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    79
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    80
     * Write any cached data to the underlying output mechanism.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    81
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    82
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    83
    public void flush() throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    84
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    85
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    86
     * Writes an attribute to the output stream without
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    87
     * a prefix.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    88
     * @param localName the local name of the attribute
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    89
     * @param value the value of the attribute
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    90
     * @throws IllegalStateException if the current state does not allow Attribute writing
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    91
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    92
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    93
    public void writeAttribute(String localName, String value)
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    94
            throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    95
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    96
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    97
     * Writes a CData section
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    98
     * @param data the data contained in the CData Section, may not be null
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
    99
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   100
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   101
    public void writeCData(String data) throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   102
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   103
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   104
     * Write a DTD section.  This string represents the entire doctypedecl production
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   105
     * from the XML 1.0 specification.
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   106
     *
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   107
     * @param dtd the DTD to be written
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   108
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   109
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   110
    public void writeDTD(String dtd) throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   111
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   112
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   113
     * Write the XML Declaration. Defaults the XML version to 1.0, and the encoding to utf-8
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   114
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   115
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   116
    public void writeStartDocument() throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   117
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   118
    /**
28059
e576535359cc 8067377: My hobby: caning, then then canning, the the can-can
martin
parents: 25859
diff changeset
   119
     * Write the XML Declaration. Defaults the encoding to utf-8
14908
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   120
     * @param version version of the xml document
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   121
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   122
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   123
    public void writeStartDocument(String version) throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   124
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   125
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   126
     * Write the XML Declaration.  Note that the encoding parameter does
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   127
     * not set the actual encoding of the underlying output.  That must
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   128
     * be set when the instance of the XMLStreamWriter is created using the
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   129
     * XMLOutputFactory
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   130
     * @param encoding encoding of the xml declaration
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   131
     * @param version version of the xml document
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   132
     * @throws XMLStreamException If given encoding does not match encoding
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   133
     * of the underlying stream
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   134
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   135
    public void writeStartDocument(String encoding, String version)
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   136
        throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   137
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   138
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   139
     * Write text to the output
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   140
     * @param text the value to write
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   141
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   142
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   143
    public void writeCharacters(String text) throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   144
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   145
    /**
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   146
     * Write text to the output
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   147
     * @param text the value to write
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   148
     * @param start the starting position in the array
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   149
     * @param len the number of characters to write
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   150
     * @throws XMLStreamException
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   151
     */
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   152
    public void writeCharacters(char[] text, int start, int len)
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   153
        throws XMLStreamException;
1d01112e9ce5 8004371: (props) Properties.loadFromXML needs small footprint XML parser as fallback when JAXP is not present
joehw
parents:
diff changeset
   154
}