Source Code Cross Referenced for XmlReaderException.java in  » RSS-RDF » Rome » com » sun » syndication » io » 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 » RSS RDF » Rome » com.sun.syndication.io 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.sun.syndication.io;
002:
003:        import java.io.InputStream;
004:        import java.io.IOException;
005:
006:        /**
007:         * The XmlReaderException is thrown by the XmlReader constructors if the charset encoding
008:         * can not be determined according to the XML 1.0 specification and RFC 3023.
009:         * <p>
010:         * The exception returns the unconsumed InputStream to allow the application to do an
011:         * alternate processing with the stream. Note that the original InputStream given to the
012:         * XmlReader cannot be used as that one has been already read.
013:         * <p>
014:         *
015:         * @author Alejandro Abdelnur
016:         *
017:         */
018:        public class XmlReaderException extends IOException {
019:            private String _bomEncoding;
020:            private String _xmlGuessEncoding;
021:            private String _xmlEncoding;
022:            private String _contentTypeMime;
023:            private String _contentTypeEncoding;
024:            private InputStream _is;
025:
026:            /**
027:             * Creates an exception instance if the charset encoding could not be determined.
028:             * <p>
029:             * Instances of this exception are thrown by the XmlReader.
030:             * <p>
031:             * @param msg message describing the reason for the exception.
032:             * @param bomEnc BOM encoding.
033:             * @param xmlGuessEnc XML guess encoding.
034:             * @param xmlEnc XML prolog encoding.
035:             * @param is the unconsumed InputStream.
036:             *
037:             */
038:            public XmlReaderException(String msg, String bomEnc,
039:                    String xmlGuessEnc, String xmlEnc, InputStream is) {
040:                this (msg, null, null, bomEnc, xmlGuessEnc, xmlEnc, is);
041:            }
042:
043:            /**
044:             * Creates an exception instance if the charset encoding could not be determined.
045:             * <p>
046:             * Instances of this exception are thrown by the XmlReader.
047:             * <p>
048:             * @param msg message describing the reason for the exception.
049:             * @param ctMime MIME type in the content-type.
050:             * @param ctEnc encoding in the content-type.
051:             * @param bomEnc BOM encoding.
052:             * @param xmlGuessEnc XML guess encoding.
053:             * @param xmlEnc XML prolog encoding.
054:             * @param is the unconsumed InputStream.
055:             *
056:             */
057:            public XmlReaderException(String msg, String ctMime, String ctEnc,
058:                    String bomEnc, String xmlGuessEnc, String xmlEnc,
059:                    InputStream is) {
060:                super (msg);
061:                _contentTypeMime = ctMime;
062:                _contentTypeEncoding = ctEnc;
063:                _bomEncoding = bomEnc;
064:                _xmlGuessEncoding = xmlGuessEnc;
065:                _xmlEncoding = xmlEnc;
066:                _is = is;
067:            }
068:
069:            /**
070:             * Returns the BOM encoding found in the InputStream.
071:             * <p>
072:             * @return the BOM encoding, null if none.
073:             *
074:             */
075:            public String getBomEncoding() {
076:                return _bomEncoding;
077:            }
078:
079:            /**
080:             * Returns the encoding guess based on the first bytes of the InputStream.
081:             * <p>
082:             * @return the encoding guess, null if it couldn't be guessed.
083:             *
084:             */
085:            public String getXmlGuessEncoding() {
086:                return _xmlGuessEncoding;
087:            }
088:
089:            /**
090:             * Returns the encoding found in the XML prolog of the InputStream.
091:             * <p>
092:             * @return the encoding of the XML prolog, null if none.
093:             *
094:             */
095:            public String getXmlEncoding() {
096:                return _xmlEncoding;
097:            }
098:
099:            /**
100:             * Returns the MIME type in the content-type used to attempt determining the encoding.
101:             * <p>
102:             * @return the MIME type in the content-type, null if there was not content-type or the encoding detection
103:             *         did not involve HTTP.
104:             *
105:             */
106:            public String getContentTypeMime() {
107:                return _contentTypeMime;
108:            }
109:
110:            /**
111:             * Returns the encoding in the content-type used to attempt determining the encoding.
112:             * <p>
113:             * @return the encoding in the content-type, null if there was not content-type, no encoding in it
114:             *         or the encoding detection did not involve HTTP.
115:             *
116:             */
117:            public String getContentTypeEncoding() {
118:                return _contentTypeEncoding;
119:            }
120:
121:            /**
122:             * Returns the unconsumed InputStream to allow the application to do an alternate
123:             * encoding detection on the InputStream.
124:             * <p>
125:             * @return the unconsumed InputStream.
126:             *
127:             */
128:            public InputStream getInputStream() {
129:                return _is;
130:            }
131:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.