286N/A * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved. 286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A// Public Domain: no warranty. 286N/A * SAX2 extension to augment the entity information provided 286N/A * though a {@link Locator}. 286N/A * If an implementation supports this extension, the Locator 286N/A * provided in {@link org.xml.sax.ContentHandler#setDocumentLocator 286N/A * ContentHandler.setDocumentLocator() } will implement this 286N/A * flag will have the value <em>true</em>. 286N/A * <em>This module, both source code and documentation, is in the 286N/A * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> 286N/A * <p> XMLReader implementations are not required to support this 286N/A * information, and it is not part of core-only SAX2 distributions.</p> 286N/A * @since SAX 2.0 (extensions 1.1 alpha) 286N/A * @author David Brownell 286N/A * Returns the version of XML used for the entity. This will 286N/A * normally be the identifier from the current entity's 286N/A * <em><?xml version='...' ...?></em> declaration, 286N/A * or be defaulted by the parser. 286N/A * @return Identifier for the XML version being used to interpret 286N/A * the entity's text, or null if that information is not yet 286N/A * available in the current parsing state. 286N/A * Returns the name of the character encoding for the entity. 286N/A * If the encoding was declared externally (for example, in a MIME 286N/A * Content-Type header), that will be the name returned. Else if there 286N/A * was an <em><?xml ...encoding='...'?></em> declaration at 286N/A * the start of the document, that encoding name will be returned. 286N/A * Otherwise the encoding will been inferred (normally to be UTF-8, or 286N/A * some UTF-16 variant), and that inferred name will be returned. 286N/A * <p>When an {@link org.xml.sax.InputSource InputSource} is used 286N/A * to provide an entity's character stream, this method returns the 286N/A * encoding provided in that input stream. 286N/A * <p> Note that some recent W3C specifications require that text 286N/A * in some encodings be normalized, using Unicode Normalization 286N/A * Form C, before processing. Such normalization must be performed 286N/A * by applications, and would normally be triggered based on the 286N/A * value returned by this method. 286N/A * <p> Encoding names may be those used by the underlying JVM, 286N/A * and comparisons should be case-insensitive. 286N/A * @return Name of the character encoding being used to interpret 286N/A * * the entity's text, or null if this was not provided for a * 286N/A * character stream passed through an InputSource or is otherwise 286N/A * not yet available in the current parsing state.