src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DelegatingXMLStreamWriter.java

Sun, 18 Jun 2017 23:18:45 +0100

author
aefimov
date
Sun, 18 Jun 2017 23:18:45 +0100
changeset 1443
dffc222439a1
parent 0
373ffda63c9a
permissions
-rw-r--r--

8172297: In java 8, the marshalling with JAX-WS does not escape carriage return
Reviewed-by: lancea

     1 /*
     2  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Oracle in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    24  */
    26 package com.sun.xml.internal.txw2.output;
    28 import javax.xml.stream.XMLStreamWriter;
    29 import javax.xml.stream.XMLStreamException;
    30 import javax.xml.namespace.NamespaceContext;
    32 /**
    33  * Delegating {@link XMLStreamWriter}.
    34  *
    35  * @author Kohsuke Kawaguchi
    36  */
    37 abstract class DelegatingXMLStreamWriter implements XMLStreamWriter {
    38     private final XMLStreamWriter writer;
    40     public DelegatingXMLStreamWriter(XMLStreamWriter writer) {
    41         this.writer = writer;
    42     }
    44     public void writeStartElement(String localName) throws XMLStreamException {
    45         writer.writeStartElement(localName);
    46     }
    48     public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
    49         writer.writeStartElement(namespaceURI, localName);
    50     }
    52     public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
    53         writer.writeStartElement(prefix, localName, namespaceURI);
    54     }
    56     public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
    57         writer.writeEmptyElement(namespaceURI, localName);
    58     }
    60     public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
    61         writer.writeEmptyElement(prefix, localName, namespaceURI);
    62     }
    64     public void writeEmptyElement(String localName) throws XMLStreamException {
    65         writer.writeEmptyElement(localName);
    66     }
    68     public void writeEndElement() throws XMLStreamException {
    69         writer.writeEndElement();
    70     }
    72     public void writeEndDocument() throws XMLStreamException {
    73         writer.writeEndDocument();
    74     }
    76     public void close() throws XMLStreamException {
    77         writer.close();
    78     }
    80     public void flush() throws XMLStreamException {
    81         writer.flush();
    82     }
    84     public void writeAttribute(String localName, String value) throws XMLStreamException {
    85         writer.writeAttribute(localName, value);
    86     }
    88     public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
    89         writer.writeAttribute(prefix, namespaceURI, localName, value);
    90     }
    92     public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
    93         writer.writeAttribute(namespaceURI, localName, value);
    94     }
    96     public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException {
    97         writer.writeNamespace(prefix, namespaceURI);
    98     }
   100     public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException {
   101         writer.writeDefaultNamespace(namespaceURI);
   102     }
   104     public void writeComment(String data) throws XMLStreamException {
   105         writer.writeComment(data);
   106     }
   108     public void writeProcessingInstruction(String target) throws XMLStreamException {
   109         writer.writeProcessingInstruction(target);
   110     }
   112     public void writeProcessingInstruction(String target, String data) throws XMLStreamException {
   113         writer.writeProcessingInstruction(target, data);
   114     }
   116     public void writeCData(String data) throws XMLStreamException {
   117         writer.writeCData(data);
   118     }
   120     public void writeDTD(String dtd) throws XMLStreamException {
   121         writer.writeDTD(dtd);
   122     }
   124     public void writeEntityRef(String name) throws XMLStreamException {
   125         writer.writeEntityRef(name);
   126     }
   128     public void writeStartDocument() throws XMLStreamException {
   129         writer.writeStartDocument();
   130     }
   132     public void writeStartDocument(String version) throws XMLStreamException {
   133         writer.writeStartDocument(version);
   134     }
   136     public void writeStartDocument(String encoding, String version) throws XMLStreamException {
   137         writer.writeStartDocument(encoding, version);
   138     }
   140     public void writeCharacters(String text) throws XMLStreamException {
   141         writer.writeCharacters(text);
   142     }
   144     public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
   145         writer.writeCharacters(text, start, len);
   146     }
   148     public String getPrefix(String uri) throws XMLStreamException {
   149         return writer.getPrefix(uri);
   150     }
   152     public void setPrefix(String prefix, String uri) throws XMLStreamException {
   153         writer.setPrefix(prefix, uri);
   154     }
   156     public void setDefaultNamespace(String uri) throws XMLStreamException {
   157         writer.setDefaultNamespace(uri);
   158     }
   160     public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
   161         writer.setNamespaceContext(context);
   162     }
   164     public NamespaceContext getNamespaceContext() {
   165         return writer.getNamespaceContext();
   166     }
   168     public Object getProperty(String name) throws IllegalArgumentException {
   169         return writer.getProperty(name);
   170     }
   171 }

mercurial