src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXParserWrapper.java

changeset 0
373ffda63c9a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXParserWrapper.java	Wed Apr 27 01:27:09 2016 +0800
     1.3 @@ -0,0 +1,236 @@
     1.4 +/*
     1.5 + * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Oracle designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Oracle in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 + * or visit www.oracle.com if you need additional information or have any
    1.26 + * questions.
    1.27 + *
    1.28 + * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
    1.29 + */
    1.30 +
    1.31 +package com.sun.xml.internal.fastinfoset.stax.util;
    1.32 +
    1.33 +import javax.xml.namespace.QName;
    1.34 +import javax.xml.namespace.NamespaceContext;
    1.35 +
    1.36 +import javax.xml.stream.XMLStreamReader;
    1.37 +import javax.xml.stream.Location;
    1.38 +import javax.xml.stream.XMLStreamException;
    1.39 +
    1.40 +
    1.41 +public class StAXParserWrapper implements XMLStreamReader{
    1.42 +    private XMLStreamReader _reader;
    1.43 +
    1.44 +    /** Creates a new instance of StAXParserWrapper */
    1.45 +    public StAXParserWrapper() {
    1.46 +    }
    1.47 +
    1.48 +    public StAXParserWrapper(XMLStreamReader reader) {
    1.49 +        _reader = reader;
    1.50 +    }
    1.51 +    public void setReader(XMLStreamReader reader) {
    1.52 +        _reader = reader;
    1.53 +    }
    1.54 +    public XMLStreamReader getReader() {
    1.55 +        return _reader;
    1.56 +    }
    1.57 +
    1.58 +    public int next() throws XMLStreamException
    1.59 +    {
    1.60 +        return _reader.next();
    1.61 +    }
    1.62 +
    1.63 +    public int nextTag() throws XMLStreamException
    1.64 +    {
    1.65 +        return _reader.nextTag();
    1.66 +    }
    1.67 +
    1.68 +    public String getElementText() throws XMLStreamException
    1.69 +    {
    1.70 +        return _reader.getElementText();
    1.71 +    }
    1.72 +
    1.73 +    public void require(int type, String namespaceURI, String localName) throws XMLStreamException
    1.74 +    {
    1.75 +        _reader.require(type,namespaceURI,localName);
    1.76 +    }
    1.77 +
    1.78 +    public boolean hasNext() throws XMLStreamException
    1.79 +    {
    1.80 +        return _reader.hasNext();
    1.81 +    }
    1.82 +
    1.83 +    public void close() throws XMLStreamException
    1.84 +    {
    1.85 +        _reader.close();
    1.86 +    }
    1.87 +
    1.88 +    public String getNamespaceURI(String prefix)
    1.89 +    {
    1.90 +        return _reader.getNamespaceURI(prefix);
    1.91 +    }
    1.92 +
    1.93 +    public NamespaceContext getNamespaceContext() {
    1.94 +        return _reader.getNamespaceContext();
    1.95 +    }
    1.96 +
    1.97 +    public boolean isStartElement() {
    1.98 +        return _reader.isStartElement();
    1.99 +    }
   1.100 +
   1.101 +    public boolean isEndElement() {
   1.102 +        return _reader.isEndElement();
   1.103 +    }
   1.104 +
   1.105 +    public boolean isCharacters() {
   1.106 +    return _reader.isCharacters();
   1.107 +    }
   1.108 +
   1.109 +    public boolean isWhiteSpace() {
   1.110 +        return _reader.isWhiteSpace();
   1.111 +    }
   1.112 +
   1.113 +    public QName getAttributeName(int index) {
   1.114 +        return _reader.getAttributeName(index);
   1.115 +    }
   1.116 +
   1.117 +    public int getTextCharacters(int sourceStart, char[] target, int targetStart,
   1.118 +                               int length) throws XMLStreamException
   1.119 +    {
   1.120 +        return _reader.getTextCharacters(sourceStart, target, targetStart, length);
   1.121 +    }
   1.122 +
   1.123 +    public String getAttributeValue(String namespaceUri,
   1.124 +                                  String localName)
   1.125 +    {
   1.126 +        return _reader.getAttributeValue(namespaceUri,localName);
   1.127 +    }
   1.128 +    public int getAttributeCount() {
   1.129 +        return _reader.getAttributeCount();
   1.130 +    }
   1.131 +    public String getAttributePrefix(int index) {
   1.132 +        return _reader.getAttributePrefix(index);
   1.133 +    }
   1.134 +    public String getAttributeNamespace(int index) {
   1.135 +        return _reader.getAttributeNamespace(index);
   1.136 +    }
   1.137 +    public String getAttributeLocalName(int index) {
   1.138 +        return _reader.getAttributeLocalName(index);
   1.139 +    }
   1.140 +    public String getAttributeType(int index) {
   1.141 +        return _reader.getAttributeType(index);
   1.142 +    }
   1.143 +    public String getAttributeValue(int index) {
   1.144 +        return _reader.getAttributeValue(index);
   1.145 +    }
   1.146 +    public boolean isAttributeSpecified(int index) {
   1.147 +        return _reader.isAttributeSpecified(index);
   1.148 +    }
   1.149 +
   1.150 +    public int getNamespaceCount() {
   1.151 +        return _reader.getNamespaceCount();
   1.152 +    }
   1.153 +    public String getNamespacePrefix(int index) {
   1.154 +        return _reader.getNamespacePrefix(index);
   1.155 +    }
   1.156 +    public String getNamespaceURI(int index) {
   1.157 +        return _reader.getNamespaceURI(index);
   1.158 +    }
   1.159 +
   1.160 +    public int getEventType() {
   1.161 +        return _reader.getEventType();
   1.162 +    }
   1.163 +
   1.164 +    public String getText() {
   1.165 +        return _reader.getText();
   1.166 +    }
   1.167 +
   1.168 +    public char[] getTextCharacters() {
   1.169 +        return _reader.getTextCharacters();
   1.170 +    }
   1.171 +
   1.172 +    public int getTextStart() {
   1.173 +        return _reader.getTextStart();
   1.174 +    }
   1.175 +
   1.176 +    public int getTextLength() {
   1.177 +        return _reader.getTextLength();
   1.178 +    }
   1.179 +
   1.180 +    public String getEncoding() {
   1.181 +        return _reader.getEncoding();
   1.182 +    }
   1.183 +
   1.184 +    public boolean hasText() {
   1.185 +        return _reader.hasText();
   1.186 +    }
   1.187 +
   1.188 +    public Location getLocation() {
   1.189 +        return _reader.getLocation();
   1.190 +    }
   1.191 +
   1.192 +    public QName getName() {
   1.193 +        return _reader.getName();
   1.194 +    }
   1.195 +
   1.196 +    public String getLocalName() {
   1.197 +        return _reader.getLocalName();
   1.198 +    }
   1.199 +
   1.200 +    public boolean hasName() {
   1.201 +        return _reader.hasName();
   1.202 +    }
   1.203 +
   1.204 +    public String getNamespaceURI() {
   1.205 +        return _reader.getNamespaceURI();
   1.206 +    }
   1.207 +
   1.208 +    public String getPrefix() {
   1.209 +        return _reader.getPrefix();
   1.210 +    }
   1.211 +
   1.212 +    public String getVersion() {
   1.213 +        return _reader.getVersion();
   1.214 +    }
   1.215 +
   1.216 +    public boolean isStandalone() {
   1.217 +        return _reader.isStandalone();
   1.218 +    }
   1.219 +
   1.220 +    public boolean standaloneSet() {
   1.221 +        return _reader.standaloneSet();
   1.222 +    }
   1.223 +
   1.224 +    public String getCharacterEncodingScheme() {
   1.225 +        return _reader.getCharacterEncodingScheme();
   1.226 +    }
   1.227 +
   1.228 +    public String getPITarget() {
   1.229 +        return _reader.getPITarget();
   1.230 +    }
   1.231 +
   1.232 +    public String getPIData() {
   1.233 +        return _reader.getPIData();
   1.234 +    }
   1.235 +
   1.236 +    public Object getProperty(String name) {
   1.237 +        return _reader.getProperty(name);
   1.238 +    }
   1.239 +}

mercurial