1 6 package org.xml.sax; 7 8 37 public class SAXParseException extends SAXException { 38 39 40 44 45 57 public SAXParseException (String message, Locator locator) { 58 super(message); 59 if (locator != null) { 60 init(locator.getPublicId(), locator.getSystemId(), 61 locator.getLineNumber(), locator.getColumnNumber()); 62 } else { 63 init(null, null, -1, -1); 64 } 65 } 66 67 68 83 public SAXParseException (String message, Locator locator, 84 Exception e) { 85 super(message, e); 86 if (locator != null) { 87 init(locator.getPublicId(), locator.getSystemId(), 88 locator.getLineNumber(), locator.getColumnNumber()); 89 } else { 90 init(null, null, -1, -1); 91 } 92 } 93 94 95 116 public SAXParseException (String message, String publicId, String systemId, 117 int lineNumber, int columnNumber) 118 { 119 super(message); 120 init(publicId, systemId, lineNumber, columnNumber); 121 } 122 123 124 148 public SAXParseException (String message, String publicId, String systemId, 149 int lineNumber, int columnNumber, Exception e) 150 { 151 super(message, e); 152 init(publicId, systemId, lineNumber, columnNumber); 153 } 154 155 156 166 private void init (String publicId, String systemId, 167 int lineNumber, int columnNumber) 168 { 169 this.publicId = publicId; 170 this.systemId = systemId; 171 this.lineNumber = lineNumber; 172 this.columnNumber = columnNumber; 173 } 174 175 176 183 public String getPublicId () 184 { 185 return this.publicId; 186 } 187 188 189 199 public String getSystemId () 200 { 201 return this.systemId; 202 } 203 204 205 214 public int getLineNumber () 215 { 216 return this.lineNumber; 217 } 218 219 220 229 public int getColumnNumber () 230 { 231 return this.columnNumber; 232 } 233 234 235 239 240 244 private String publicId; 245 246 247 251 private String systemId; 252 253 254 258 private int lineNumber; 259 260 261 265 private int columnNumber; 266 267 static final long serialVersionUID = -5651165872476709336L; 269 } 270 271 | Popular Tags |