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
⏎ java/time/ZoneRegion.java
/* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ /* * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * * Neither the name of JSR-310 nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package java.time; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; import java.time.zone.ZoneRules; import java.time.zone.ZoneRulesException; import java.time.zone.ZoneRulesProvider; import java.util.Objects; /** * A geographical region where the same time-zone rules apply. * <p> * Time-zone information is categorized as a set of rules defining when and * how the offset from UTC/Greenwich changes. These rules are accessed using * identifiers based on geographical regions, such as countries or states. * The most common region classification is the Time Zone Database (TZDB), * which defines regions such as 'Europe/Paris' and 'Asia/Tokyo'. * <p> * The region identifier, modeled by this class, is distinct from the * underlying rules, modeled by {@link ZoneRules}. * The rules are defined by governments and change frequently. * By contrast, the region identifier is well-defined and long-lived. * This separation also allows rules to be shared between regions if appropriate. * * @implSpec * This class is immutable and thread-safe. * * @since 1.8 */ final class ZoneRegion extends ZoneId implements Serializable { /** * Serialization version. */ private static final long serialVersionUID = 8386373296231747096L; /** * The time-zone ID, not null. */ private final String id; /** * The time-zone rules, null if zone ID was loaded leniently. */ private final transient ZoneRules rules; /** * Obtains an instance of {@code ZoneId} from an identifier. * * @param zoneId the time-zone ID, not null * @param checkAvailable whether to check if the zone ID is available * @return the zone ID, not null * @throws DateTimeException if the ID format is invalid * @throws ZoneRulesException if checking availability and the ID cannot be found */ static ZoneRegion ofId(String zoneId, boolean checkAvailable) { Objects.requireNonNull(zoneId, "zoneId"); checkName(zoneId); ZoneRules rules = null; try { // always attempt load for better behavior after deserialization rules = ZoneRulesProvider.getRules(zoneId, true); } catch (ZoneRulesException ex) { if (checkAvailable) { throw ex; } } return new ZoneRegion(zoneId, rules); } /** * Checks that the given string is a legal ZondId name. * * @param zoneId the time-zone ID, not null * @throws DateTimeException if the ID format is invalid */ private static void checkName(String zoneId) { int n = zoneId.length(); if (n < 2) { throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId); } for (int i = 0; i < n; i++) { char c = zoneId.charAt(i); if (c >= 'a' && c <= 'z') continue; if (c >= 'A' && c <= 'Z') continue; if (c == '/' && i != 0) continue; if (c >= '0' && c <= '9' && i != 0) continue; if (c == '~' && i != 0) continue; if (c == '.' && i != 0) continue; if (c == '_' && i != 0) continue; if (c == '+' && i != 0) continue; if (c == '-' && i != 0) continue; throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId); } } //------------------------------------------------------------------------- /** * Constructor. * * @param id the time-zone ID, not null * @param rules the rules, null for lazy lookup */ ZoneRegion(String id, ZoneRules rules) { this.id = id; this.rules = rules; } //----------------------------------------------------------------------- @Override public String getId() { return id; } @Override public ZoneRules getRules() { // additional query for group provider when null allows for possibility // that the provider was updated after the ZoneId was created return (rules != null ? rules : ZoneRulesProvider.getRules(id, false)); } //----------------------------------------------------------------------- /** * Writes the object using a * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. * @serialData * <pre> * out.writeByte(7); // identifies a ZoneId (not ZoneOffset) * out.writeUTF(zoneId); * </pre> * * @return the instance of {@code Ser}, not null */ private Object writeReplace() { return new Ser(Ser.ZONE_REGION_TYPE, this); } /** * Defend against malicious streams. * * @param s the stream to read * @throws InvalidObjectException always */ private void readObject(ObjectInputStream s) throws InvalidObjectException { throw new InvalidObjectException("Deserialization via serialization delegate"); } @Override void write(DataOutput out) throws IOException { out.writeByte(Ser.ZONE_REGION_TYPE); writeExternal(out); } void writeExternal(DataOutput out) throws IOException { out.writeUTF(id); } static ZoneId readExternal(DataInput in) throws IOException { String id = in.readUTF(); return ZoneId.of(id, false); } }
⏎ java/time/ZoneRegion.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, 205185👍, 0💬
Popular Posts:
JAX-RPC is an API for building Web services and clients that used remote procedure calls (RPC) and X...
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
Where to find answers to frequently asked questions on Download and Installing of Older Versions? He...
JDK 11 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 11 Internal Jvmstat module. JDK 11 Intern...