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 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
⏎ sun/net/ProgressSource.java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.net; import java.net.URL; /** * ProgressSource represents the source of progress changes. * * @author Stanley Man-Kit Ho */ public class ProgressSource { public enum State { NEW, CONNECTED, UPDATE, DELETE }; // URL private URL url; // URL method private String method; // Content type private String contentType; // bytes read private long progress = 0; // last bytes read private long lastProgress = 0; //bytes expected private long expected = -1; // the last thing to happen with this source private State state; // connect flag private boolean connected = false; // threshold for notification private int threshold = 8192; // progress monitor private ProgressMonitor progressMonitor; /** * Construct progress source object. */ public ProgressSource(URL url, String method) { this(url, method, -1); } /** * Construct progress source object. */ public ProgressSource(URL url, String method, long expected) { this.url = url; this.method = method; this.contentType = "content/unknown"; this.progress = 0; this.lastProgress = 0; this.expected = expected; this.state = State.NEW; this.progressMonitor = ProgressMonitor.getDefault(); this.threshold = progressMonitor.getProgressUpdateThreshold(); } public boolean connected() { if (!connected) { connected = true; state = State.CONNECTED; return false; } return true; } /** * Close progress source. */ public void close() { state = State.DELETE; } /** * Return URL of progress source. */ public URL getURL() { return url; } /** * Return method of URL. */ public String getMethod() { return method; } /** * Return content type of URL. */ public String getContentType() { return contentType; } // Change content type public void setContentType(String ct) { contentType = ct; } /** * Return current progress. */ public long getProgress() { return progress; } /** * Return expected maximum progress; -1 if expected is unknown. */ public long getExpected() { return expected; } /** * Return state. */ public State getState() { return state; } /** * Begin progress tracking. */ public void beginTracking() { progressMonitor.registerSource(this); } /** * Finish progress tracking. */ public void finishTracking() { progressMonitor.unregisterSource(this); } /** * Update progress. */ public void updateProgress(long latestProgress, long expectedProgress) { lastProgress = progress; progress = latestProgress; expected = expectedProgress; if (connected() == false) state = State.CONNECTED; else state = State.UPDATE; // The threshold effectively divides the progress into // different set of ranges: // // Range 0: 0..threshold-1, // Range 1: threshold .. 2*threshold-1 // .... // Range n: n*threshold .. (n+1)*threshold-1 // // To determine which range the progress belongs to, it // would be calculated as follow: // // range number = progress / threshold // // Notification should only be triggered when the current // progress and the last progress are in different ranges, // i.e. they have different range numbers. // // Using this range scheme, notification will be generated // only once when the progress reaches each range. // if (lastProgress / threshold != progress / threshold) { progressMonitor.updateProgress(this); } // Detect read overrun if (expected != -1) { if (progress >= expected && progress != 0) close(); } } public Object clone() throws CloneNotSupportedException { return super.clone(); } public String toString() { return getClass().getName() + "[url=" + url + ", method=" + method + ", state=" + state + ", content-type=" + contentType + ", progress=" + progress + ", expected=" + expected + "]"; } }
⏎ sun/net/ProgressSource.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, 206304👍, 0💬
Popular Posts:
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
How to display types defined in an XML Schema file with the xs\QueryXS.java provided in the Apache X...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JDK 11 jdk.rmic.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) Compiler Tool tool, ...
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...