Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
JDK 17 jdk.jfr.jmod - JFR Module
JDK 17 jdk.jfr.jmod is the JMOD file for JDK 17 JFR module.
JDK 17 JFR module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jfr.jmod.
JDK 17 JFR module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JFR module source code files are stored in \fyicenter\jdk-17.0.5\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/tool/Assemble.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.tool;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.channels.FileChannel;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Deque;
import java.util.List;
final class Assemble extends Command {
@Override
public String getName() {
return "assemble";
}
@Override
public List<String> getOptionSyntax() {
return Collections.singletonList("<repository> <file>");
}
@Override
public String getDescription() {
return "Assemble leftover chunks from a disk repository into a recording file";
}
@Override
public void displayOptionUsage(PrintStream stream) {
stream.println(" <repository> Directory where the repository is located");
stream.println();
stream.println(" <file> Name of the recording file (.jfr) to create");
}
@Override
public void execute(Deque<String> options) throws UserSyntaxException, UserDataException {
ensureMinArgumentCount(options, 2);
ensureMaxArgumentCount(options, 2);
Path repository = getDirectory(options.pop());
Path file = Paths.get(options.pop());
ensureFileDoesNotExist(file);
ensureFileExtension(file, ".jfr");
try (FileOutputStream fos = new FileOutputStream(file.toFile())) {
List<Path> files = listJFRFiles(repository);
if (files.isEmpty()) {
throw new UserDataException("no *.jfr files found at " + repository);
}
println();
println("Assembling files... ");
println();
transferTo(files, file, fos.getChannel());
println();
println("Finished.");
} catch (IOException e) {
throw new UserDataException("could not open destination file " + file + ". " + e.getMessage());
}
}
private List<Path> listJFRFiles(Path path) throws UserDataException {
try {
List<Path> files = new ArrayList<>();
if (Files.isDirectory(path)) {
try (DirectoryStream<Path> stream = Files.newDirectoryStream(path, "*.jfr")) {
for (Path p : stream) {
if (!Files.isDirectory(p) && Files.isReadable(p)) {
files.add(p);
}
}
}
}
files.sort((u, v) -> u.getFileName().compareTo(v.getFileName()));
return files;
} catch (IOException ioe) {
throw new UserDataException("could not list *.jfr for directory " + path + ". " + ioe.getMessage());
}
}
private void transferTo(List<Path> sourceFiles, Path output, FileChannel out) throws UserDataException {
long pos = 0;
for (Path p : sourceFiles) {
println(" " + p.toString());
try (FileChannel sourceChannel = FileChannel.open(p)) {
long rem = Files.size(p);
while (rem > 0) {
long n = Math.min(rem, 1024 * 1024);
long w = out.transferFrom(sourceChannel, pos, n);
pos += w;
rem -= w;
}
} catch (IOException ioe) {
throw new UserDataException("could not copy recording chunk " + p + " to new file. " + ioe.getMessage());
}
}
}
}
⏎ jdk/jfr/internal/tool/Assemble.java
Or download all of them as a single archive file:
File name: jdk.jfr-17.0.5-src.zip File size: 363343 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jlink.jmod - JLink Tool
2023-04-17, ≈42🔥, 0💬
Popular Posts:
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
How to download and install JDK (Java Development Kit) 6? If you want to write Java applications, yo...
What Is HttpComponents httpcore-4.2.2.jar? HttpComponents httpcore-4.2.2.jar is the JAR file for Apa...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
JDK 17 jdk.internal.vm.ci.jmod is the JMOD file for JDK 17 Internal VM CI module. JDK 17 Internal VM...