MCPcopy Create free account
hub / github.com/apache/tomcat / startDocument

Method startDocument

java/org/apache/tomcat/util/digester/Digester.java:1273–1297  ·  view source on GitHub ↗

Process notification of the beginning of the document being reached. @exception SAXException if a parsing error is to be reported

()

Source from the content-addressed store, hash-verified

1271 * @exception SAXException if a parsing error is to be reported
1272 */
1273 @Override
1274 public void startDocument() throws SAXException {
1275
1276 if (saxLog.isTraceEnabled()) {
1277 saxLog.trace("startDocument()");
1278 }
1279
1280 if (locator instanceof Locator2) {
1281 if (root instanceof DocumentProperties.Charset) {
1282 String enc = ((Locator2) locator).getEncoding();
1283 if (enc != null) {
1284 try {
1285 ((DocumentProperties.Charset) root).setCharset(B2CConverter.getCharset(enc));
1286 } catch (UnsupportedEncodingException e) {
1287 log.warn(sm.getString("digester.encodingInvalid", enc), e);
1288 }
1289 }
1290 }
1291 }
1292
1293 // ensure that the digester is properly configured, as
1294 // the digester could be used as a SAX ContentHandler
1295 // rather than via the parse() methods.
1296 configure();
1297 }
1298
1299
1300 /**

Callers

nothing calls this directly

Calls 8

getCharsetMethod · 0.95
configureMethod · 0.95
isTraceEnabledMethod · 0.65
traceMethod · 0.65
setCharsetMethod · 0.65
warnMethod · 0.65
getStringMethod · 0.65
getEncodingMethod · 0.45

Tested by

no test coverage detected