01: package com.rimfaxe.xml.xmlreader;
02:
03: /**
04: * Thrown when declared encoding does not match assumed encoding.
05:
06: <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
07: This file is part of Sparta, an XML Parser, DOM, and XPath library.
08: This library is free software; you can redistribute it and/or
09: modify it under the terms of the GNU Lesser General Public License
10: as published by the Free Software Foundation; either version 2.1 of
11: the License, or (at your option) any later version. This library
12: is distributed in the hope that it will be useful, but WITHOUT ANY
13: WARRANTY; without even the implied warranty of MERCHANTABILITY or
14: FITNESS FOR A PARTICULAR PURPOSE.</small></blockquote>
15: @see <a "href="doc-files/LGPL.txt">GNU Lesser General Public License</a>
16: @version $Date: 2002/08/19 05:04:01 $ $Revision: 1.1.1.1 $
17: @author Eamonn O'Brien-Strain
18:
19: */
20:
21: public class EncodingMismatchException extends ParseException {
22:
23: EncodingMismatchException(String systemId, String declaredEncoding,
24: String assumedEncoding) {
25: super (systemId, 0, declaredEncoding.charAt(declaredEncoding
26: .length() - 1), declaredEncoding, "encoding \'"
27: + declaredEncoding + "\' declared instead of of "
28: + assumedEncoding + " as expected");
29: declaredEncoding_ = declaredEncoding;
30: }
31:
32: String getDeclaredEncoding() {
33: return declaredEncoding_;
34: }
35:
36: private String declaredEncoding_;
37:
38: }
39:
40: // $Log: EncodingMismatchException.java,v $
41: // Revision 1.1.1.1 2002/08/19 05:04:01 eobrain
42: // import from HP Labs internal CVS
43: //
44: // Revision 1.4 2002/08/18 04:35:44 eob
45: // Add copyright and other formatting and commenting in preparation for
46: // release to SourceForge.
47: //
48: // Revision 1.3 2002/08/05 20:04:32 sermarti
49: //
50: // Revision 1.2 2002/05/09 16:49:09 eob
51: // Add history arg.
52: //
53: // Revision 1.1 2002/01/08 19:25:38 eob
54: // initial
|