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 11 java.base.jmod - Base Module
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module.
JDK 11 Base module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.base.jmod.
JDK 11 Base module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Base module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ java/io/FileCleanable.java
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.io;
import jdk.internal.misc.JavaIOFileDescriptorAccess;
import jdk.internal.misc.SharedSecrets;
import jdk.internal.ref.CleanerFactory;
import jdk.internal.ref.PhantomCleanable;
import java.lang.ref.Cleaner;
/**
* Cleanable for a FileDescriptor when it becomes phantom reachable.
* For regular fds on Unix and regular handles on Windows
* register a cleanup if fd != -1 or handle != -1.
* <p>
* Subclassed from {@code PhantomCleanable} so that {@code clear} can be
* called to disable the cleanup when the handle is closed by any means other
* than calling {@link FileDescriptor#close}.
* Otherwise, it might incorrectly close the handle after it has been reused.
*/
final class FileCleanable extends PhantomCleanable<FileDescriptor> {
// Access to FileDescriptor private fields;
// avoids making fd and handle package private
private static final JavaIOFileDescriptorAccess fdAccess =
SharedSecrets.getJavaIOFileDescriptorAccess();
/*
* Raw close of the file fd and/or handle.
* Used only for last chance cleanup.
*/
private static native void cleanupClose0(int fd, long handle) throws IOException;
// The raw fd to close
private final int fd;
// The handle to close
private final long handle;
/**
* Register a Cleanable with the FileDescriptor
* if the FileDescriptor is non-null and valid.
* @implNote
* A exception (OutOfMemoryException) will leave the FileDescriptor
* having allocated resources and leak the fd/handle.
*
* @param fdo the FileDescriptor; may be null
*/
static void register(FileDescriptor fdo) {
if (fdo != null && fdo.valid()) {
int fd = fdAccess.get(fdo);
long handle = fdAccess.getHandle(fdo);
fdo.registerCleanup(new FileCleanable(fdo, CleanerFactory.cleaner(), fd, handle));
}
}
/**
* Unregister a Cleanable from the FileDescriptor.
* @param fdo the FileDescriptor; may be null
*/
static void unregister(FileDescriptor fdo) {
if (fdo != null) {
fdo.unregisterCleanup();
}
}
/**
* Constructor for a phantom cleanable reference.
*
* @param obj the object to monitor
* @param cleaner the cleaner
* @param fd file descriptor to close
* @param handle handle to close
*/
private FileCleanable(FileDescriptor obj, Cleaner cleaner, int fd, long handle) {
super(obj, cleaner);
this.fd = fd;
this.handle = handle;
}
/**
* Close the native handle or fd.
*/
@Override
protected void performCleanup() {
try {
cleanupClose0(fd, handle);
} catch (IOException ioe) {
throw new UncheckedIOException("close", ioe);
}
}
}
⏎ java/io/FileCleanable.java
Or download all of them as a single archive file:
File name: java.base-11.0.1-src.zip File size: 8740354 bytes Release date: 2018-11-04 Download
2020-05-29, ≈557🔥, 0💬
Popular Posts:
xml-commons External Source Code Files are provided in the source package file, xml-commons-external...
maven-core-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Core module. Apache Maven is a software ...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...
A stream buffer is a stream-based representation of an XML infoset in Java. Stream buffers are desig...
JDK 11 java.smartcardio.jmod is the JMOD file for JDK 11 Smartcardio module. JDK 11 Smart Card IO mo...