Source Code Cross Referenced for Reader.java in  » Web-Services-AXIS2 » jax-ws » org » apache » axis2 » jaxws » message » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services AXIS2 » jax ws » org.apache.axis2.jaxws.message.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */
019:        package org.apache.axis2.jaxws.message.util;
020:
021:        import org.apache.axis2.jaxws.ExceptionFactory;
022:        import org.apache.axis2.jaxws.i18n.Messages;
023:
024:        import javax.xml.namespace.NamespaceContext;
025:        import javax.xml.namespace.QName;
026:        import javax.xml.stream.Location;
027:        import javax.xml.stream.XMLStreamException;
028:        import javax.xml.stream.XMLStreamReader;
029:        import javax.xml.ws.WebServiceException;
030:
031:        /**
032:         * Reader In many situations, you want the ability to reset an XMLStreamReader. (Or at least ask if
033:         * the XMLStreamReader is resettable).
034:         * <p/>
035:         * The Reader abstract class: - accepts an XMLStreamReader - provides reset() and isResettable()
036:         * methods Adds support resettable support to XMLStreamReader
037:         * <p/>
038:         * Derived classes must pass the initial reader to the constructor and indicate if it is resettable.
039:         * Derived classes must also provide an implementation of the newReader() method if resettable.
040:         */
041:        public abstract class Reader implements  XMLStreamReader {
042:            protected XMLStreamReader reader;
043:            private final boolean resettable;
044:
045:            /**
046:             * @param reader
047:             * @param resettable
048:             */
049:            Reader(XMLStreamReader reader, boolean resettable) {
050:                this .reader = reader;
051:                this .resettable = resettable;
052:            }
053:
054:            /**
055:             * Get a newReader from the Object
056:             *
057:             * @return XMLStreamReader
058:             */
059:            protected abstract XMLStreamReader newReader();
060:
061:            /**
062:             * isResettable
063:             *
064:             * @return true or false
065:             */
066:            public boolean isResettable() {
067:                return resettable;
068:            }
069:
070:            public void reset() throws WebServiceException {
071:                if (!resettable) {
072:                    throw ExceptionFactory.makeWebServiceException(Messages
073:                            .getMessage("resetReaderErr"));
074:                }
075:                reader = newReader();
076:            }
077:
078:            public void close() throws XMLStreamException {
079:                reader.close();
080:            }
081:
082:            public int getAttributeCount() {
083:                return reader.getAttributeCount();
084:            }
085:
086:            public String getAttributeLocalName(int arg0) {
087:                return reader.getAttributeLocalName(arg0);
088:            }
089:
090:            public QName getAttributeName(int arg0) {
091:                return reader.getAttributeName(arg0);
092:            }
093:
094:            public String getAttributeNamespace(int arg0) {
095:                return reader.getAttributeNamespace(arg0);
096:            }
097:
098:            public String getAttributePrefix(int arg0) {
099:                return reader.getAttributePrefix(arg0);
100:            }
101:
102:            public String getAttributeType(int arg0) {
103:                return reader.getAttributeType(arg0);
104:            }
105:
106:            public String getAttributeValue(int arg0) {
107:                return reader.getAttributeValue(arg0);
108:            }
109:
110:            public String getAttributeValue(String arg0, String arg1) {
111:                return reader.getAttributeValue(arg0, arg1);
112:            }
113:
114:            public String getCharacterEncodingScheme() {
115:                return reader.getCharacterEncodingScheme();
116:            }
117:
118:            public String getElementText() throws XMLStreamException {
119:                return reader.getElementText();
120:            }
121:
122:            public String getEncoding() {
123:                return reader.getEncoding();
124:            }
125:
126:            public int getEventType() {
127:                return reader.getEventType();
128:            }
129:
130:            public String getLocalName() {
131:                return reader.getLocalName();
132:            }
133:
134:            public Location getLocation() {
135:                return reader.getLocation();
136:            }
137:
138:            public QName getName() {
139:                return reader.getName();
140:            }
141:
142:            public NamespaceContext getNamespaceContext() {
143:                return reader.getNamespaceContext();
144:            }
145:
146:            public int getNamespaceCount() {
147:                return reader.getNamespaceCount();
148:            }
149:
150:            public String getNamespacePrefix(int arg0) {
151:                return reader.getNamespacePrefix(arg0);
152:            }
153:
154:            public String getNamespaceURI() {
155:                return reader.getNamespaceURI();
156:            }
157:
158:            public String getNamespaceURI(int arg0) {
159:                return reader.getNamespaceURI(arg0);
160:            }
161:
162:            public String getNamespaceURI(String arg0) {
163:                return reader.getNamespaceURI(arg0);
164:            }
165:
166:            public String getPIData() {
167:                return reader.getPIData();
168:            }
169:
170:            public String getPITarget() {
171:                return reader.getPITarget();
172:            }
173:
174:            public String getPrefix() {
175:                return reader.getPrefix();
176:            }
177:
178:            public Object getProperty(String arg0)
179:                    throws IllegalArgumentException {
180:                return reader.getProperty(arg0);
181:            }
182:
183:            public String getText() {
184:                return reader.getText();
185:            }
186:
187:            public char[] getTextCharacters() {
188:                return reader.getTextCharacters();
189:            }
190:
191:            public int getTextCharacters(int arg0, char[] arg1, int arg2,
192:                    int arg3) throws XMLStreamException {
193:                return reader.getTextCharacters(arg0, arg1, arg2, arg3);
194:            }
195:
196:            public int getTextLength() {
197:                return reader.getTextLength();
198:            }
199:
200:            public int getTextStart() {
201:                return reader.getTextStart();
202:            }
203:
204:            public String getVersion() {
205:                return reader.getVersion();
206:            }
207:
208:            public boolean hasName() {
209:                return reader.hasName();
210:            }
211:
212:            public boolean hasNext() throws XMLStreamException {
213:                return reader.hasNext();
214:            }
215:
216:            public boolean hasText() {
217:                return reader.hasText();
218:            }
219:
220:            public boolean isAttributeSpecified(int arg0) {
221:                return reader.isAttributeSpecified(arg0);
222:            }
223:
224:            public boolean isCharacters() {
225:                return reader.isCharacters();
226:            }
227:
228:            public boolean isEndElement() {
229:                return reader.isEndElement();
230:            }
231:
232:            public boolean isStandalone() {
233:                return reader.isStandalone();
234:            }
235:
236:            public boolean isStartElement() {
237:                return reader.isStartElement();
238:            }
239:
240:            public boolean isWhiteSpace() {
241:                return reader.isWhiteSpace();
242:            }
243:
244:            public int next() throws XMLStreamException {
245:                return reader.next();
246:            }
247:
248:            public int nextTag() throws XMLStreamException {
249:                return reader.nextTag();
250:            }
251:
252:            public void require(int arg0, String arg1, String arg2)
253:                    throws XMLStreamException {
254:                reader.require(arg0, arg1, arg2);
255:            }
256:
257:            public boolean standaloneSet() {
258:                return reader.standaloneSet();
259:            }
260:
261:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.