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.base.jmod - Base Module
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module.
JDK 17 Base module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.base.jmod.
JDK 17 Base module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Base module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ java/net/SocketCleanable.java
/* * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.net; import jdk.internal.access.JavaIOFileDescriptorAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.ref.CleanerFactory; import jdk.internal.ref.PhantomCleanable; import java.io.FileDescriptor; import java.io.IOException; import java.io.UncheckedIOException; import java.lang.ref.Cleaner; import sun.net.ResourceManager; /** * Cleanable for a socket/datagramsocket FileDescriptor when it becomes phantom reachable. * Create a cleanup if the raw fd != -1. Windows closes sockets using the fd. * Subclassed from {@code PhantomCleanable} so that {@code clear} can be * called to disable the cleanup when the socket fd is closed by any means * other than calling {@link FileDescriptor#close}. * Otherwise, it might incorrectly close the handle or fd after it has been reused. */ final class SocketCleanable extends PhantomCleanable<FileDescriptor> { // Access to FileDescriptor private fields private static final JavaIOFileDescriptorAccess fdAccess = SharedSecrets.getJavaIOFileDescriptorAccess(); // Native function to call NET_SocketClose(fd) // Used only for last chance cleanup. private static native void cleanupClose0(int fd) throws IOException; // The raw fd to close private final int fd; // true for socket, false for datagram socket private final boolean stream; /** * Register a socket specific Cleanable with the FileDescriptor * if the FileDescriptor is non-null and the raw fd is != -1. * * @param fdo the FileDescriptor; may be null * @param stream false for datagram socket */ static void register(FileDescriptor fdo, boolean stream) { if (fdo != null && fdo.valid()) { int fd = fdAccess.get(fdo); fdAccess.registerCleanup(fdo, new SocketCleanable(fdo, CleanerFactory.cleaner(), fd, stream)); } } /** * Unregister a Cleanable from the FileDescriptor. * @param fdo the FileDescriptor; may be null */ static void unregister(FileDescriptor fdo) { if (fdo != null) { fdAccess.unregisterCleanup(fdo); } } /** * Constructor for a phantom cleanable reference. * * @param obj the object to monitor * @param cleaner the cleaner * @param fd file descriptor to close * @param stream false for datagram socket */ private SocketCleanable(FileDescriptor obj, Cleaner cleaner, int fd, boolean stream) { super(obj, cleaner); this.fd = fd; this.stream = stream; } /** * Close the native handle or fd. */ @Override protected void performCleanup() { try { cleanupClose0(fd); } catch (IOException ioe) { throw new UncheckedIOException("close", ioe); } finally { if (!stream) { ResourceManager.afterUdpClose(); } } } }
⏎ java/net/SocketCleanable.java
Or download all of them as a single archive file:
File name: java.base-17.0.5-src.zip File size: 8883851 bytes Release date: 2022-09-13 Download
2023-09-26, 114519👍, 1💬
Popular Posts:
How to download and install ojdbc7.jar for Oracle 12c R1? ojdbc8.jar for Oracle 12c R1 is a Java 7 a...
JDK 11 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 11 Internal Jvmstat module. JDK 11 Intern...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...
commons-collections4-4.4 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...