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.jlink.jmod - JLink Tool
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool, which can be invoked by the "jlink" command.
JDK 11 JLink tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jlink.jmod.
JDK 11 JLink tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JLink tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jlink.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/tools/jlink/internal/BasicImageWriter.java
/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.tools.jlink.internal; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List; import java.util.Objects; import jdk.internal.jimage.ImageHeader; import jdk.internal.jimage.ImageStream; import jdk.internal.jimage.ImageStringsReader; public final class BasicImageWriter { public static final String MODULES_IMAGE_NAME = "modules"; private final static int RETRY_LIMIT = 1000; private ByteOrder byteOrder; private ImageStringsWriter strings; private int length; private int[] redirect; private ImageLocationWriter[] locations; private List<ImageLocationWriter> input; private ImageStream headerStream; private ImageStream redirectStream; private ImageStream locationOffsetStream; private ImageStream locationStream; private ImageStream allIndexStream; public BasicImageWriter() { this(ByteOrder.nativeOrder()); } public BasicImageWriter(ByteOrder byteOrder) { this.byteOrder = Objects.requireNonNull(byteOrder); this.input = new ArrayList<>(); this.strings = new ImageStringsWriter(); this.headerStream = new ImageStream(byteOrder); this.redirectStream = new ImageStream(byteOrder); this.locationOffsetStream = new ImageStream(byteOrder); this.locationStream = new ImageStream(byteOrder); this.allIndexStream = new ImageStream(byteOrder); } public ByteOrder getByteOrder() { return byteOrder; } public int addString(String string) { return strings.add(string); } public String getString(int offset) { return strings.get(offset); } public void addLocation(String fullname, long contentOffset, long compressedSize, long uncompressedSize) { ImageLocationWriter location = ImageLocationWriter.newLocation(fullname, strings, contentOffset, compressedSize, uncompressedSize); input.add(location); length++; } ImageLocationWriter[] getLocations() { return locations; } int getLocationsCount() { return input.size(); } private void generatePerfectHash() { PerfectHashBuilder<ImageLocationWriter> builder = new PerfectHashBuilder<>( PerfectHashBuilder.Entry.class, PerfectHashBuilder.Bucket.class); input.forEach((location) -> { builder.put(location.getFullName(), location); }); builder.generate(); length = builder.getCount(); redirect = builder.getRedirect(); PerfectHashBuilder.Entry<ImageLocationWriter>[] order = builder.getOrder(); locations = new ImageLocationWriter[length]; for (int i = 0; i < length; i++) { locations[i] = order[i].getValue(); } } private void prepareStringBytes() { strings.getStream().align(2); } private void prepareRedirectBytes() { for (int i = 0; i < length; i++) { redirectStream.putInt(redirect[i]); } } private void prepareLocationBytes() { // Reserve location offset zero for empty locations locationStream.put(ImageLocationWriter.ATTRIBUTE_END << 3); for (int i = 0; i < length; i++) { ImageLocationWriter location = locations[i]; if (location != null) { location.writeTo(locationStream); } } locationStream.align(2); } private void prepareOffsetBytes() { for (int i = 0; i < length; i++) { ImageLocationWriter location = locations[i]; int offset = location != null ? location.getLocationOffset() : 0; locationOffsetStream.putInt(offset); } } private void prepareHeaderBytes() { ImageHeader header = new ImageHeader(input.size(), length, locationStream.getSize(), strings.getSize()); header.writeTo(headerStream); } private void prepareTableBytes() { allIndexStream.put(headerStream); allIndexStream.put(redirectStream); allIndexStream.put(locationOffsetStream); allIndexStream.put(locationStream); allIndexStream.put(strings.getStream()); } public byte[] getBytes() { if (allIndexStream.getSize() == 0) { generatePerfectHash(); prepareStringBytes(); prepareRedirectBytes(); prepareLocationBytes(); prepareOffsetBytes(); prepareHeaderBytes(); prepareTableBytes(); } return allIndexStream.toArray(); } ImageLocationWriter find(String key) { int index = redirect[ImageStringsReader.hashCode(key) % length]; if (index < 0) { index = -index - 1; } else { index = ImageStringsReader.hashCode(key, index) % length; } return locations[index]; } }
⏎ jdk/tools/jlink/internal/BasicImageWriter.java
Or download all of them as a single archive file:
File name: jdk.jlink-11.0.1-src.zip File size: 155677 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jshell.jmod - JShell Tool
2020-06-30, 24939👍, 0💬
Popular Posts:
What Is HttpComponents httpcore-4.2.2.jar? HttpComponents httpcore-4.2.2.jar is the JAR file for Apa...
Apache Log4j SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implemen...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...
What Is javamail-1_2.zip? javamail-1_2.zip is the binary package of JavaMail API 1.2 in ZIP format. ...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...