Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 java.logging.jmod - Logging Module
JDK 17 java.logging.jmod is the JMOD file for JDK 17 Logging module.
JDK 17 Logging module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.logging.jmod.
JDK 17 Logging module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Logging module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.logging.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ java/util/logging/Formatter.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.util.logging; /** * A Formatter provides support for formatting LogRecords. * <p> * Typically each logging Handler will have a Formatter associated * with it. The Formatter takes a LogRecord and converts it to * a string. * <p> * Some formatters (such as the XMLFormatter) need to wrap head * and tail strings around a set of formatted records. The getHeader * and getTail methods can be used to obtain these strings. * * @since 1.4 */ public abstract class Formatter { /** * Construct a new formatter. */ protected Formatter() { } /** * Format the given log record and return the formatted string. * <p> * The resulting formatted String will normally include a * localized and formatted version of the LogRecord's message field. * It is recommended to use the {@link Formatter#formatMessage} * convenience method to localize and format the message field. * * @param record the log record to be formatted. * @return the formatted log record */ public abstract String format(LogRecord record); /** * Return the header string for a set of formatted records. * <p> * This base class returns an empty string, but this may be * overridden by subclasses. * * @param h The target handler (can be null) * @return header string */ public String getHead(Handler h) { return ""; } /** * Return the tail string for a set of formatted records. * <p> * This base class returns an empty string, but this may be * overridden by subclasses. * * @param h The target handler (can be null) * @return tail string */ public String getTail(Handler h) { return ""; } /** * Localize and format the message string from a log record. This * method is provided as a convenience for Formatter subclasses to * use when they are performing formatting. * <p> * The message string is first localized to a format string using * the record's ResourceBundle. (If there is no ResourceBundle, * or if the message key is not found, then the key is used as the * format string.) The format String uses java.text style * formatting. * <ul> * <li>If there are no parameters, no formatter is used. * <li>Otherwise, if the string contains "{{@literal<digit>}" * where {@literal <digit>} is in [0-9], * java.text.MessageFormat is used to format the string. * <li>Otherwise no formatting is performed. * </ul> * * @param record the log record containing the raw message * @return a localized and formatted message */ public String formatMessage(LogRecord record) { String format = record.getMessage(); java.util.ResourceBundle catalog = record.getResourceBundle(); if (catalog != null) { try { format = catalog.getString(format); } catch (java.util.MissingResourceException ex) { // Drop through. Use record message as format } } // Do the formatting. try { Object parameters[] = record.getParameters(); if (parameters == null || parameters.length == 0) { // No parameters. Just return format string. return format; } // Is it a java.text style format? // Ideally we could match with // Pattern.compile("\\{\\d").matcher(format).find()) // However the cost is 14% higher, so we cheaply use indexOf // and charAt to look for that pattern. int index = -1; int fence = format.length() - 1; while ((index = format.indexOf('{', index+1)) > -1) { if (index >= fence) break; char digit = format.charAt(index+1); if (digit >= '0' && digit <= '9') { return java.text.MessageFormat.format(format, parameters); } } return format; } catch (Exception ex) { // Formatting failed: use localized format string. return format; } } }
⏎ java/util/logging/Formatter.java
Or download all of them as a single archive file:
File name: java.logging-17.0.5-src.zip File size: 106791 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.management.jmod - Management Module
2023-09-23, 1996👍, 0💬
Popular Posts:
JDK 11 jdk.internal.le.jmod is the JMOD file for JDK 11 Internal Line Editing module. JDK 11 Interna...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...
How to perform XML Schema validation with sax\Writer.java provided in the Apache Xerces package? You...
What is the sax\Counter.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 inst...
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...