public interface Locator2 extends Locator
Locator
。如果一个执行支持这个扩展,定位器提供
ContentHandler.setDocumentLocator()
将实现这个接口,和http://xml.org/sax/features/use-locator2特征标志将有价值的真实。
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.
XmlReader实现不要求支持这一信息,而不是部分核心SAX2分布。
Modifier and Type | Method and Description |
---|---|
String |
getEncoding()
返回实体的字符编码的名称。
|
String |
getXMLVersion()
返回实体的XML版本。
|
getColumnNumber, getLineNumber, getPublicId, getSystemId
String getXMLVersion()
String getEncoding()
当一个InputSource
是用来提供一个实体的字符流,此方法返回的编码,输入流提供。
值得注意的是,近期一些W3C规范要求在一些编码的文本进行标准化,使用的Unicode范式C、前处理。这种规范化必须由应用程序执行,通常会根据该方法返回的值触发。
编码名称可能是由底层的JVM使用,比较是区分大小写的。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.