2362N/A * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Format a LogRecord into a standard XML format. 0N/A * The DTD specification is provided as Appendix A to the 0N/A * Java Logging APIs specification. 0N/A * The XMLFormatter can be used with arbitrary character encodings, 0N/A * but it is recommended that it normally be used with UTF-8. The 0N/A * character encoding can be set on the output Handler. 0N/A // Append a two digit number. 0N/A // Append the time and date in ISO 8601 format 0N/A // Append to the given StringBuffer an escaped version of the 0N/A // given text string where XML special characters have been escaped. 0N/A // For a null string we append "<null>" 0N/A * Format the given message to XML. 0N/A * This method can be overridden in a subclass. 0N/A * It is recommended to use the {@link Formatter#formatMessage} 0N/A * convenience method to localize and format the message field. 0N/A * @param record the log record to be formatted. 0N/A * @return a formatted log record 0N/A // Format the message string and its accompanying parameters. 0N/A // If the message is being localized, output the key, resource 0N/A // bundle name, and params. 0N/A // The message is not in the catalog. Drop through. 0N/A // Check to see if the parameter was not a messagetext format 0N/A // or was not null or empty 0N/A // Report on the state of the throwable. 0N/A // Check for a line number. 0N/A * Return the header string for a set of XML formatted records. 0N/A * @param h The target handler (can be null) 0N/A * @return a valid XML string 0N/A // Figure out the default encoding. 0N/A // Try to map the encoding name to a canonical name. 0N/A // We hit problems finding a canonical name. 0N/A // Just use the raw encoding name. 0N/A * Return the tail string for a set of XML formatted records. 0N/A * @param h The target handler (can be null) 0N/A * @return a valid XML string