Categories:
Audio (13)
Biotech (29)
Bytecode (35)
Database (77)
Framework (7)
Game (7)
General (512)
Graphics (53)
I/O (32)
IDE (2)
JAR Tools (86)
JavaBeans (16)
JDBC (89)
JDK (337)
JSP (20)
Logging (103)
Mail (54)
Messaging (8)
Network (71)
PDF (94)
Report (7)
Scripting (83)
Security (32)
Server (119)
Servlet (17)
SOAP (24)
Testing (50)
Web (19)
XML (301)
Other Resources:
JDK 1.1 Source Code Directory
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes:
"C:\fyicenter\jdk-1.1.8\src".
Here is the list of Java classes of the JDK 1.1 source code:
✍: FYIcenter
⏎ java/sql/Date.java
/* * @(#)Date.java 1.7 01/12/10 * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.sql; /** * <P>This class is a thin wrapper around java.util.Date that allows * JDBC to identify this as a SQL DATE value. It adds formatting and * parsing operations to support the JDBC escape syntax for date * values. */ public class Date extends java.util.Date { /** * Construct a Date * * @param year year-1900 * @param month 0 to 11 * @param day 1 to 31 */ public Date(int year, int month, int day) { super(year, month, day); } /** * Construct a Date using a milliseconds time value * * @param date milliseconds since January 1, 1970, 00:00:00 GMT */ public Date(long date) { // If the millisecond date value contains time info, mask it out. super(date); int year = getYear(); int month = getMonth(); int day = getDate(); super.setTime(0); setYear(year); setMonth(month); setDate(day); } /** * Set a Date using a milliseconds time value * * @param date milliseconds since January 1, 1970, 00:00:00 GMT */ public void setTime(long date) { // If the millisecond date value contains time info, mask it out. super.setTime(date); int year = getYear(); int month = getMonth(); int day = getDate(); super.setTime(0); setYear(year); setMonth(month); setDate(day); } /** * Convert a string in JDBC date escape format to a Date value * * @param s date in format "yyyy-mm-dd" * @return corresponding Date */ public static Date valueOf(String s) { int year; int month; int day; int firstDash; int secondDash; if (s == null) throw new java.lang.IllegalArgumentException(); firstDash = s.indexOf('-'); secondDash = s.indexOf('-', firstDash+1); if ((firstDash > 0) & (secondDash > 0) & (secondDash < s.length()-1)) { year = Integer.parseInt(s.substring(0, firstDash)) - 1900; month = Integer.parseInt(s.substring(firstDash+1, secondDash)) - 1; day = Integer.parseInt(s.substring(secondDash+1)); } else { throw new java.lang.IllegalArgumentException(); } return new Date(year, month, day); } /** * Format a date in JDBC date escape format * * @return a String in yyyy-mm-dd format */ public String toString () { int year = super.getYear() + 1900; int month = super.getMonth() + 1; int day = super.getDate(); String yearString; String monthString; String dayString; yearString = Integer.toString(year); if (month < 10) { monthString = "0" + month; } else { monthString = Integer.toString(month); } if (day < 10) { dayString = "0" + day; } else { dayString = Integer.toString(day); } return ( yearString + "-" + monthString + "-" + dayString); } // Override all the time operations inherited from java.util.Date; public int getHours() { throw new java.lang.IllegalArgumentException(); } public int getMinutes() { throw new java.lang.IllegalArgumentException(); } public int getSeconds() { throw new java.lang.IllegalArgumentException(); } public void setHours(int i) { throw new java.lang.IllegalArgumentException(); } public void setMinutes(int i) { throw new java.lang.IllegalArgumentException(); } public void setSeconds(int i) { throw new java.lang.IllegalArgumentException(); } }
⏎ java/sql/Date.java
Â
⇒ Backup JDK 1.1 Installation Directory
⇠JDK 1.1 classes.zip - Java Core Classes
2018-11-17, 91356👍, 0💬
Popular Posts:
What Is HttpComponents httpclient-4.2.2.jar? HttpComponents httpclient-4.2.2.jar is the JAR file for...
JDK 6 tools.jar is the JAR file for JDK 6 tools. It contains Java classes to support different JDK t...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
What Is commons-lang3-3.1.jar? commons-lang3-3.1.jar is the JAR file for Apache Commons Lang 3.1, wh...
The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible...