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 11 jdk.jfr.jmod - JFR Module
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module.
JDK 11 JFR module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jfr.jmod.
JDK 11 JFR module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JFR module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jfr.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jfr/internal/cmd/XMLWriter.java
/* * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jfr.internal.cmd; import java.io.IOException; import java.io.PrintWriter; import java.nio.file.Path; import jdk.jfr.EventType; import jdk.jfr.ValueDescriptor; import jdk.jfr.consumer.RecordedEvent; import jdk.jfr.consumer.RecordedObject; import jdk.jfr.consumer.RecordingFile; final class XMLWriter extends StructuredWriter { public XMLWriter(PrintWriter destination) { super(destination); } public void print(Path source) throws IOException { try (RecordingFile es = new RecordingFile(source)) { println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); println("<recording>"); indent(); printIndent(); println("<events>"); indent(); while (es.hasMoreEvents()) { printEvent(es.readEvent()); flush(); } retract(); printIndent(); println("</events>"); retract(); println("</recording>"); flush(); } } private void printEvent(RecordedEvent e) throws IOException { EventType type = e.getEventType(); printIndent(); print("<event"); printAttribute("typeId", String.valueOf(type.getId())); printAttribute("name", type.getName()); printAttribute("startTime",e.getStartTime().toString()); printAttribute("duration", e.getDuration().toString()); print(">"); printObject(e); printIndent(); println("</event>"); println(); } private void printAttribute(String name, String value) { print(" ", name, "=\"", value, "\""); } public void printObject(RecordedObject struct) { println(); indent(); for (ValueDescriptor v : struct.getFields()) { printValueDescriptor(v, struct.getValue(v.getName()), -1); } retract(); } private void printArray(ValueDescriptor v, Object[] array) { println(); indent(); for (int index = 0; index < array.length; index++) { printValueDescriptor(v, array[index], index); } retract(); } private void printValueDescriptor(ValueDescriptor vd, Object value, int index) { boolean arrayElement = index != -1; String name = arrayElement ? null : vd.getName(); if (vd.isArray() && !arrayElement) { if (printBeginElement("array", name, value, index)) { printArray(vd, (Object[]) value); printIndent(); printEndElement("array"); } return; } if (!vd.getFields().isEmpty()) { if (printBeginElement("struct", name, value, index)) { printObject((RecordedObject) value); printIndent(); printEndElement("struct"); } return; } if (printBeginElement("value", name, value, index)) { printEscaped(String.valueOf(value)); printEndElement("value"); } } private boolean printBeginElement(String elementName, String name, Object value, int index) { printIndent(); print("<", elementName); if (name != null) { printAttribute("name", name); } if (index != -1) { printAttribute("index", Integer.toString(index)); } if (value == null) { print("><null/></"); print(elementName); println(">"); return false; } if (value.getClass().isArray()) { Object[] array = (Object[]) value; printAttribute("size", Integer.toString(array.length)); } print(">"); return true; } private void printEndElement(String elementName) { print("</"); print(elementName); println(">"); } private void printEscaped(String text) { for (int i = 0; i < text.length(); i++) { printEscaped(text.charAt(i)); } } private void printEscaped(char c) { if (c == 34) { print("""); return; } if (c == 38) { print("&"); return; } if (c == 39) { print("'"); return; } if (c == 60) { print("<"); return; } if (c == 62) { print(">"); return; } if (c > 0x7F) { print("&#"); print((int) c); print(';'); return; } print(c); } }
⏎ jdk/jfr/internal/cmd/XMLWriter.java
Or download all of them as a single archive file:
File name: jdk.jfr-11.0.1-src.zip File size: 237632 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jlink.jmod - JLink Tool
2020-06-30, 37714👍, 0💬
Popular Posts:
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers. Both...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
What JAR files are required to run dom\Counter.java provided in the Apache Xerces package? You can f...
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...
How to download and install JDK (Java Development Kit) 5? If you want to write Java applications, yo...