|
From: <ls...@us...> - 2007-06-17 07:09:58
|
Revision: 3265
http://jnode.svn.sourceforge.net/jnode/?rev=3265&view=rev
Author: lsantha
Date: 2007-06-17 00:09:54 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/java/java/io/Console.java
trunk/core/src/openjdk/java/java/lang/Byte.java
trunk/core/src/openjdk/java/java/lang/Integer.java
trunk/core/src/openjdk/java/java/lang/Long.java
trunk/core/src/openjdk/java/java/lang/NumberFormatException.java
trunk/core/src/openjdk/java/java/lang/Short.java
trunk/core/src/openjdk/java/java/util/Properties.java
trunk/core/src/openjdk/java/java/util/XMLUtils.java
trunk/core/src/openjdk/java/java/util/jar/
trunk/core/src/openjdk/java/java/util/jar/JavaUtilJarAccessImpl.java
trunk/core/src/openjdk/sun/sun/misc/BASE64Decoder.java
trunk/core/src/openjdk/sun/sun/misc/BASE64Encoder.java
trunk/core/src/openjdk/sun/sun/misc/CEFormatException.java
trunk/core/src/openjdk/sun/sun/misc/CEStreamExhausted.java
trunk/core/src/openjdk/sun/sun/misc/CRC16.java
trunk/core/src/openjdk/sun/sun/misc/Cache.java
trunk/core/src/openjdk/sun/sun/misc/CharacterDecoder.java
trunk/core/src/openjdk/sun/sun/misc/CharacterEncoder.java
trunk/core/src/openjdk/sun/sun/misc/ClassFileTransformer.java
trunk/core/src/openjdk/sun/sun/misc/ClassLoaderUtil.java
trunk/core/src/openjdk/sun/sun/misc/Cleaner.java
trunk/core/src/openjdk/sun/sun/misc/Compare.java
trunk/core/src/openjdk/sun/sun/misc/CompoundEnumeration.java
trunk/core/src/openjdk/sun/sun/misc/ConditionLock.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionDependency.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionInfo.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionInstallationException.java
trunk/core/src/openjdk/sun/sun/misc/ExtensionInstallationProvider.java
trunk/core/src/openjdk/sun/sun/misc/FileURLMapper.java
trunk/core/src/openjdk/sun/sun/misc/FormattedFloatingDecimal.java
trunk/core/src/openjdk/sun/sun/misc/GC.java
trunk/core/src/openjdk/sun/sun/misc/HexDumpEncoder.java
trunk/core/src/openjdk/sun/sun/misc/InvalidJarIndexException.java
trunk/core/src/openjdk/sun/sun/misc/JarFilter.java
trunk/core/src/openjdk/sun/sun/misc/JarIndex.java
trunk/core/src/openjdk/sun/sun/misc/JavaIOAccess.java
trunk/core/src/openjdk/sun/sun/misc/JavaLangAccess.java
trunk/core/src/openjdk/sun/sun/misc/JavaNetAccess.java
trunk/core/src/openjdk/sun/sun/misc/LRUCache.java
trunk/core/src/openjdk/sun/sun/misc/Launcher.java
trunk/core/src/openjdk/sun/sun/misc/Lock.java
trunk/core/src/openjdk/sun/sun/misc/MessageUtils.java
trunk/core/src/openjdk/sun/sun/misc/MetaIndex.java
trunk/core/src/openjdk/sun/sun/misc/NativeSignalHandler.java
trunk/core/src/openjdk/sun/sun/misc/OSEnvironment.java
trunk/core/src/openjdk/sun/sun/misc/Perf.java
trunk/core/src/openjdk/sun/sun/misc/PerformanceLogger.java
trunk/core/src/openjdk/sun/sun/misc/ProxyGenerator.java
trunk/core/src/openjdk/sun/sun/misc/Queue.java
trunk/core/src/openjdk/sun/sun/misc/REException.java
trunk/core/src/openjdk/sun/sun/misc/Ref.java
trunk/core/src/openjdk/sun/sun/misc/Regexp.java
trunk/core/src/openjdk/sun/sun/misc/RegexpPool.java
trunk/core/src/openjdk/sun/sun/misc/RegexpTarget.java
trunk/core/src/openjdk/sun/sun/misc/Request.java
trunk/core/src/openjdk/sun/sun/misc/RequestProcessor.java
trunk/core/src/openjdk/sun/sun/misc/Resource.java
trunk/core/src/openjdk/sun/sun/misc/SharedSecrets.java
trunk/core/src/openjdk/sun/sun/misc/Signal.java
trunk/core/src/openjdk/sun/sun/misc/SignalHandler.java
trunk/core/src/openjdk/sun/sun/misc/SoftCache.java
trunk/core/src/openjdk/sun/sun/misc/Sort.java
trunk/core/src/openjdk/sun/sun/misc/Timeable.java
trunk/core/src/openjdk/sun/sun/misc/Timer.java
trunk/core/src/openjdk/sun/sun/misc/UCDecoder.java
trunk/core/src/openjdk/sun/sun/misc/UCEncoder.java
trunk/core/src/openjdk/sun/sun/misc/URLClassPath.java
trunk/core/src/openjdk/sun/sun/misc/UUDecoder.java
trunk/core/src/openjdk/sun/sun/misc/UUEncoder.java
trunk/core/src/openjdk/sun/sun/misc/VM.java
trunk/core/src/openjdk/sun/sun/misc/VMNotification.java
trunk/core/src/openjdk/sun/sun/misc/VMSupport.java
trunk/core/src/openjdk/sun/sun/misc/Version-template.java
trunk/core/src/openjdk/sun/sun/misc/resources/
trunk/core/src/openjdk/sun/sun/misc/resources/Messages.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_de.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_es.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_fr.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_it.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_ja.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_ko.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_sv.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_zh_CN.java
trunk/core/src/openjdk/sun/sun/misc/resources/Messages_zh_TW.java
trunk/core/src/openjdk/sun/sun/net/
trunk/core/src/openjdk/sun/sun/net/www/
trunk/core/src/openjdk/sun/sun/net/www/ParseUtil.java
trunk/core/src/openjdk/sun/sun/nio/cs/
trunk/core/src/openjdk/sun/sun/nio/cs/AbstractCharsetProvider.java
trunk/core/src/openjdk/sun/sun/nio/cs/FastCharsetProvider.java
trunk/core/src/openjdk/sun/sun/nio/cs/HistoricallyNamedCharset.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM437.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM737.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM775.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM850.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM852.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM855.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM857.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM858.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM862.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM866.java
trunk/core/src/openjdk/sun/sun/nio/cs/IBM874.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_1.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_13.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_15.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_2.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_4.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_5.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_7.java
trunk/core/src/openjdk/sun/sun/nio/cs/ISO_8859_9.java
trunk/core/src/openjdk/sun/sun/nio/cs/KOI8_R.java
trunk/core/src/openjdk/sun/sun/nio/cs/KOI8_U.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1250.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1251.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1252.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1253.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1254.java
trunk/core/src/openjdk/sun/sun/nio/cs/MS1257.java
trunk/core/src/openjdk/sun/sun/nio/cs/SingleByteDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/SingleByteEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/StreamDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/StreamEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/Surrogate.java
trunk/core/src/openjdk/sun/sun/nio/cs/ThreadLocalCoders.java
trunk/core/src/openjdk/sun/sun/nio/cs/US_ASCII.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16BE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16LE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_16LE_BOM.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32BE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32BE_BOM.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32Coder.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32LE.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_32LE_BOM.java
trunk/core/src/openjdk/sun/sun/nio/cs/UTF_8.java
trunk/core/src/openjdk/sun/sun/nio/cs/Unicode.java
trunk/core/src/openjdk/sun/sun/nio/cs/UnicodeDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/UnicodeEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Big5.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Big5_HKSCS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Big5_Solaris.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCSDecoderMapping.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_ASCII_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_ASCII_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_EBCDIC_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_IBM_EBCDIC_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DBCS_ONLY_IBM_EBCDIC_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DelegatableDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DoubleByteDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/DoubleByteEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_CN.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_JP.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_JP_LINUX.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_JP_Open.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_KR.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/EUC_TW.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ExtendedCharsets.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/GB18030.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/GBK.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/HKSCS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/HKSCS_2001.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM037.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1006.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1025.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1026.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1046.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1047.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1097.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1098.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1112.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1122.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1123.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1124.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1140.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1141.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1142.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1143.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1144.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1145.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1146.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1147.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1148.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1149.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1381.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM1383.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM273.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM277.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM278.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM280.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM284.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM285.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM297.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM33722.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM420.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM424.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM500.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM834.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM838.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM856.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM860.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM861.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM863.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM864.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM865.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM868.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM869.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM870.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM871.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM875.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM918.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM921.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM922.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM930.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM933.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM935.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM937.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM939.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM942.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM942C.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM943.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM943C.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM948.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM949.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM949C.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM950.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM964.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/IBM970.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISCII91.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_CN.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_CN_CNS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_CN_GB.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_JP.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_JP_2.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO2022_KR.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_11.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_3.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_6.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/ISO_8859_8.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JISAutoDetect.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0201.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS5022X_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS5022X_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS932_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_MS932_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Solaris_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0208_Solaris_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_MS5022X_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_MS5022X_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Solaris_Decoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/JIS_X_0212_Solaris_Encoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/Johab.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/META-INF/
trunk/core/src/openjdk/sun/sun/nio/cs/ext/META-INF/services/
trunk/core/src/openjdk/sun/sun/nio/cs/ext/META-INF/services/java.nio.charset.spi.CharsetProvider
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS1255.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS1256.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS1258.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS50220.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS50221.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS874.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS932.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS932DB.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS936.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS949.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS950.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MS950_HKSCS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MSISO2022JP.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacArabic.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacCentralEurope.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacCroatian.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacCyrillic.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacDingbat.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacGreek.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacHebrew.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacIceland.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacRoman.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacRomania.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacSymbol.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacThai.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacTurkish.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/MacUkraine.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/PCK.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/SJIS.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/SimpleEUCDecoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/SimpleEUCEncoder.java
trunk/core/src/openjdk/sun/sun/nio/cs/ext/TIS_620.java
trunk/core/src/openjdk/sun/sun/nio/cs/standard-charsets
trunk/core/src/openjdk/sun/sun/reflect/ConstantPool.java
Added: trunk/core/src/openjdk/java/java/io/Console.java
===================================================================
--- trunk/core/src/openjdk/java/java/io/Console.java (rev 0)
+++ trunk/core/src/openjdk/java/java/io/Console.java 2007-06-17 07:09:54 UTC (rev 3265)
@@ -0,0 +1,564 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.io;
+
+import java.util.*;
+import java.nio.charset.Charset;
+import sun.nio.cs.StreamDecoder;
+import sun.nio.cs.StreamEncoder;
+
+/**
+ * Methods to access the character-based console device, if any, associated
+ * with the current Java virtual machine.
+ *
+ * <p> Whether a virtual machine has a console is dependent upon the
+ * underlying platform and also upon the manner in which the virtual
+ * machine is invoked. If the virtual machine is started from an
+ * interactive command line without redirecting the standard input and
+ * output streams then its console will exist and will typically be
+ * connected to the keyboard and display from which the virtual machine
+ * was launched. If the virtual machine is started automatically, for
+ * example by a background job scheduler, then it will typically not
+ * have a console.
+ * <p>
+ * If this virtual machine has a console then it is represented by a
+ * unique instance of this class which can be obtained by invoking the
+ * {@link java.lang.System#console()} method. If no console device is
+ * available then an invocation of that method will return <tt>null</tt>.
+ * <p>
+ * Read and write operations are synchronized to guarantee the atomic
+ * completion of critical operations; therefore invoking methods
+ * {@link #readLine()}, {@link #readPassword()}, {@link #format format()},
+ * {@link #printf printf()} as well as the read, format and write operations
+ * on the objects returned by {@link #reader()} and {@link #writer()} may
+ * block in multithreaded scenarios.
+ * <p>
+ * Invoking <tt>close()</tt> on the objects returned by the {@link #reader()}
+ * and the {@link #writer()} will not close the underlying stream of those
+ * objects.
+ * <p>
+ * The console-read methods return <tt>null</tt> when the end of the
+ * console input stream is reached, for example by typing control-D on
+ * Unix or control-Z on Windows. Subsequent read operations will succeed
+ * if additional characters are later entered on the console's input
+ * device.
+ * <p>
+ * Unless otherwise specified, passing a <tt>null</tt> argument to any method
+ * in this class will cause a {@link NullPointerException} to be thrown.
+ * <p>
+ * <b>Security note:</b>
+ * If an application needs to read a password or other secure data, it should
+ * use {@link #readPassword()} or {@link #readPassword(String, Object...)} and
+ * manually zero the returned character array after processing to minimize the
+ * lifetime of sensitive data in memory.
+ *
+ * <blockquote><pre>
+ * Console cons;
+ * char[] passwd;
+ * if ((cons = System.console()) != null &&
+ * (passwd = cons.readPassword("[%s]", "Password:")) != null) {
+ * ...
+ * java.util.Arrays.fill(passwd, ' ');
+ * }
+ * </pre></blockquote>
+ *
+ * @author Xueming Shen
+ * @version 1.17, 05/05/07
+ * @since 1.6
+ */
+
+public final class Console implements Flushable
+{
+ /**
+ * Retrieves the unique {@link java.io.PrintWriter PrintWriter} object
+ * associated with this console.
+ *
+ * @return The printwriter associated with this console
+ */
+ public PrintWriter writer() {
+ return pw;
+ }
+
+ /**
+ * Retrieves the unique {@link java.io.Reader Reader} object associated
+ * with this console.
+ * <p>
+ * This method is intended to be used by sophisticated applications, for
+ * example, a {@link java.util.Scanner} object which utilizes the rich
+ * parsing/scanning functionality provided by the <tt>Scanner</tt>:
+ * <blockquote><pre>
+ * Console con = System.console();
+ * if (con != null) {
+ * Scanner sc = new Scanner(con.reader());
+ * ...
+ * }
+ * </pre></blockquote>
+ * <p>
+ * For simple applications requiring only line-oriented reading, use
+ * <tt>{@link #readLine}</tt>.
+ * <p>
+ * The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) },
+ * {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and
+ * {@link java.io.Reader#read(java.nio.CharBuffer) read(java.nio.CharBuffer)}
+ * on the returned object will not read in characters beyond the line
+ * bound for each invocation, even if the destination buffer has space for
+ * more characters. A line bound is considered to be any one of a line feed
+ * (<tt>'\n'</tt>), a carriage return (<tt>'\r'</tt>), a carriage return
+ * followed immediately by a linefeed, or an end of stream.
+ *
+ * @return The reader associated with this console
+ */
+ public Reader reader() {
+ return reader;
+ }
+
+ /**
+ * Writes a formatted string to this console's output stream using
+ * the specified format string and arguments.
+ *
+ * @param fmt
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The number of arguments is
+ * variable and may be zero. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>. The behaviour on a
+ * <tt>null</tt> argument depends on the <a
+ * href="../util/Formatter.html#syntax">conversion</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a> section
+ * of the formatter class specification.
+ *
+ * @return This console
+ */
+ public Console format(String fmt, Object ...args) {
+ formatter.format(fmt, args).flush();
+ return this;
+ }
+
+ /**
+ * A convenience method to write a formatted string to this console's
+ * output stream using the specified format string and arguments.
+ *
+ * <p> An invocation of this method of the form <tt>con.printf(format,
+ * args)</tt> behaves in exactly the same way as the invocation of
+ * <pre>con.format(format, args)</pre>.
+ *
+ * @param format
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>.
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The number of arguments is
+ * variable and may be zero. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>. The behaviour on a
+ * <tt>null</tt> argument depends on the <a
+ * href="../util/Formatter.html#syntax">conversion</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a> section of the
+ * formatter class specification.
+ *
+ * @return This console
+ */
+ public Console printf(String format, Object ... args) {
+ return format(format, args);
+ }
+
+ /**
+ * Provides a formatted prompt, then reads a single line of text from the
+ * console.
+ *
+ * @param fmt
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>.
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a> section
+ * of the formatter class specification.
+ *
+ * @throws IOError
+ * If an I/O error occurs.
+ *
+ * @return A string containing the line read from the console, not
+ * including any line-termination characters, or <tt>null</tt>
+ * if an end of stream has been reached.
+ */
+ public String readLine(String fmt, Object ... args) {
+ String line = null;
+ synchronized (writeLock) {
+ synchronized(readLock) {
+ if (fmt.length() != 0)
+ pw.format(fmt, args);
+ try {
+ char[] ca = readline(false);
+ if (ca != null)
+ line = new String(ca);
+ } catch (IOException x) {
+ throw new IOError(x);
+ }
+ }
+ }
+ return line;
+ }
+
+ /**
+ * Reads a single line of text from the console.
+ *
+ * @throws IOError
+ * If an I/O error occurs.
+ *
+ * @return A string containing the line read from the console, not
+ * including any line-termination characters, or <tt>null</tt>
+ * if an end of stream has been reached.
+ */
+ public String readLine() {
+ return readLine("");
+ }
+
+ /**
+ * Provides a formatted prompt, then reads a password or passphrase from
+ * the console with echoing disabled.
+ *
+ * @param fmt
+ * A format string as described in <a
+ * href="../util/Formatter.html#syntax">Format string syntax</a>
+ * for the prompt text.
+ *
+ * @param args
+ * Arguments referenced by the format specifiers in the format
+ * string. If there are more arguments than format specifiers, the
+ * extra arguments are ignored. The maximum number of arguments is
+ * limited by the maximum dimension of a Java array as defined by
+ * the <a href="http://java.sun.com/docs/books/vmspec/">Java
+ * Virtual Machine Specification</a>.
+ *
+ * @throws IllegalFormatException
+ * If a format string contains an illegal syntax, a format
+ * specifier that is incompatible with the given arguments,
+ * insufficient arguments given the format string, or other
+ * illegal conditions. For specification of all possible
+ * formatting errors, see the <a
+ * href="../util/Formatter.html#detail">Details</a>
+ * section of the formatter class specification.
+ *
+ * @throws IOError
+ * If an I/O error occurs.
+ *
+ * @return A character array containing the password or passphrase read
+ * from the console, not including any line-termination characters,
+ * or <tt>null</tt> if an end of stream has been reached.
+ */
+ public char[] readPassword(String fmt, Object ... args) {
+ char[] passwd = null;
+ synchronized (writeLock) {
+ synchronized(readLock) {
+ if (fmt.length() != 0)
+ pw.format(fmt, args);
+ try {
+ echoOff = echo(false);
+ passwd = readline(true);
+ } catch (IOException x) {
+ throw new IOError(x);
+ } finally {
+ try {
+ echoOff = echo(true);
+ } catch (IOException xx) {}
+ }
+ pw.println();
+ }
+ }
+ return passwd;
+ }
+
+ /**
+ * Reads a password or passphrase from the console with echoing disabled
+ *
+ * @throws IOError
+ * If an I/O error occurs.
+ *
+ * @return A character array containing the password or passphrase read
+ * from the console, not including any line-termination characters,
+ * or <tt>null</tt> if an end of stream has been reached.
+ */
+ public char[] readPassword() {
+ return readPassword("");
+ }
+
+ /**
+ * Flushes the console and forces any buffered output to be written
+ * immediately .
+ */
+ public void flush() {
+ pw.flush();
+ }
+
+ private Object readLock;
+ private Object writeLock;
+ private Reader reader;
+ private Writer out;
+ private PrintWriter pw;
+ private Formatter formatter;
+ private Charset cs;
+ private char[] rcb;
+ private static native String encoding();
+ private static native boolean echo(boolean on) throws IOException;
+ private static boolean echoOff;
+
+ private char[] readline(boolean zeroOut) throws IOException {
+ int len = reader.read(rcb, 0, rcb.length);
+ if (len < 0)
+ return null; //EOL
+ if (rcb[len-1] == '\r')
+ len--; //remove CR at end;
+ else if (rcb[len-1] == '\n') {
+ len--; //remove LF at end;
+ if (len > 0 && rcb[len-1] == '\r')
+ len--; //remove the CR, if there is one
+ }
+ char[] b = new char[len];
+ if (len > 0) {
+ System.arraycopy(rcb, 0, b, 0, len);
+ if (zeroOut) {
+ Arrays.fill(rcb, 0, len, ' ');
+ }
+ }
+ return b;
+ }
+
+ private char[] grow() {
+ assert Thread.holdsLock(readLock);
+ char[] t = new char[rcb.length * 2];
+ System.arraycopy(rcb, 0, t, 0, rcb.length);
+ rcb = t;
+ return rcb;
+ }
+
+ class LineReader extends Reader {
+ private Reader in;
+ private char[] cb;
+ private int nChars, nextChar;
+ boolean leftoverLF;
+ LineReader(Reader in) {
+ this.in = in;
+ cb = new char[1024];
+ nextChar = nChars = 0;
+ leftoverLF = false;
+ }
+ public void close () {}
+ public boolean ready() throws IOException {
+ //in.ready synchronizes on readLock already
+ return in.ready();
+ }
+
+ public int read(char cbuf[], int offset, int length)
+ throws IOException
+ {
+ int off = offset;
+ int end = offset + length;
+ if (offset < 0 || offset > cbuf.length || length < 0 ||
+ end < 0 || end > cbuf.length) {
+ throw new IndexOutOfBoundsException();
+ }
+ synchronized(readLock) {
+ boolean eof = false;
+ char c = 0;
+ for (;;) {
+ if (nextChar >= nChars) { //fill
+ int n = 0;
+ do {
+ n = in.read(cb, 0, cb.length);
+ } while (n == 0);
+ if (n > 0) {
+ nChars = n;
+ nextChar = 0;
+ if (n < cb.length &&
+ cb[n-1] != '\n' && cb[n-1] != '\r') {
+ /*
+ * we're in canonical mode so each "fill" should
+ * come back with an eol. if there no lf or nl at
+ * the end of returned bytes we reached an eof.
+ */
+ eof = true;
+ }
+ } else { /*EOF*/
+ if (off - offset == 0)
+ return -1;
+ return off - offset;
+ }
+ }
+ if (leftoverLF && cbuf == rcb && cb[nextChar] == '\n') {
+ /*
+ * if invoked by our readline, skip the leftover, otherwise
+ * return the LF.
+ */
+ nextChar++;
+ }
+ leftoverLF = false;
+ while (nextChar < nChars) {
+ c = cbuf[off++] = cb[nextChar];
+ cb[nextChar++] = 0;
+ if (c == '\n') {
+ return off - offset;
+ } else if (c == '\r') {
+ if (off == end) {
+ /* no space left even the next is LF, so return
+ * whatever we have if the invoker is not our
+ * readLine()
+ */
+ if (cbuf == rcb) {
+ cbuf = grow();
+ end = cbuf.length;
+ } else {
+ leftoverLF = true;
+ return off - offset;
+ }
+ }
+ if (nextChar == nChars && in.ready()) {
+ /*
+ * we have a CR and we reached the end of
+ * the read in buffer, fill to make sure we
+ * don't miss a LF, if there is one, it's possible
+ * that it got cut off during last round reading
+ * simply because the read in buffer was full.
+ */
+ nChars = in.read(cb, 0, cb.length);
+ nextChar = 0;
+ }
+ if (nextChar < nChars && cb[nextChar] == '\n') {
+ cbuf[off++] = '\n';
+ nextChar++;
+ }
+ return off - offset;
+ } else if (off == end) {
+ if (cbuf == rcb) {
+ cbuf = grow();
+ end = cbuf.length;
+ } else {
+ return off - offset;
+ }
+ }
+ }
+ if (eof)
+ return off - offset;
+ }
+ }
+ }
+ }
+
+ // Set up JavaIOAccess in SharedSecrets
+ static {
+ sun.misc.SharedSecrets.setJavaIOAccess(new sun.misc.JavaIOAccess() {
+ public Console console() {
+ if (istty()) {
+ if (cons == null)
+ cons = new Console();
+ return cons;
+ }
+ return null;
+ }
+
+ // Add a shutdown hook to restore console's echo state should
+ // it be necessary.
+ public Runnable consoleRestoreHook() {
+ return new Runnable() {
+ public void run() {
+ try {
+ if (echoOff) {
+ echo(true);
+ }
+ } catch (IOException x) {}
+ }
+ };
+ }
+
+ public Charset charset() {
+ // This method is called in sun.security.util.Password,
+ // cons already exists when this method is called
+ return cons.cs;
+ }
+ });
+ }
+ private static Console cons;
+ private native static boolean istty();
+ private Console() {
+ readLock = new Object();
+ writeLock = new Object();
+ String csname = encoding();
+ if (csname != null) {
+ try {
+ cs = Charset.forName(csname);
+ } catch (Exception x) {}
+ }
+ if (cs == null)
+ cs = Charset.defaultCharset();
+ out = StreamEncoder.forOutputStreamWriter(
+ new FileOutputStream(FileDescriptor.out),
+ writeLock,
+ cs);
+ pw = new PrintWriter(out, true) { public void close() {} };
+ formatter = new Formatter(out);
+ reader = new LineReader(StreamDecoder.forInputStreamReader(
+ new FileInputStream(FileDescriptor.in),
+ readLock,
+ cs));
+ rcb = new char[1024];
+ }
+}
+
Added: trunk/core/src/openjdk/java/java/lang/Byte.java
===================================================================
--- trunk/core/src/openjdk/java/java/lang/Byte.java (rev 0)
+++ trunk/core/src/openjdk/java/java/lang/Byte.java 2007-06-17 07:09:54 UTC (rev 3265)
@@ -0,0 +1,432 @@
+/*
+ * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.lang;
+
+/**
+ *
+ * The {@code Byte} class wraps a value of primitive type {@code byte}
+ * in an object. An object of type {@code Byte} contains a single
+ * field whose type is {@code byte}.
+ *
+ * <p>In addition, this class provides several methods for converting
+ * a {@code byte} to a {@code String} and a {@code String} to a {@code
+ * byte}, as well as other constants and methods useful when dealing
+ * with a {@code byte}.
+ *
+ * @author Nakul Saraiya
+ * @author Joseph D. Darcy
+ * @version 1.49, 05/05/07
+ * @see java.lang.Number
+ * @since JDK1.1
+ */
+public final class Byte extends Number implements Comparable<Byte> {
+
+ /**
+ * A constant holding the minimum value a {@code byte} can
+ * have, -2<sup>7</sup>.
+ */
+ public static final byte MIN_VALUE = -128;
+
+ /**
+ * A constant holding the maximum value a {@code byte} can
+ * have, 2<sup>7</sup>-1.
+ */
+ public static final byte MAX_VALUE = 127;
+
+ /**
+ * The {@code Class} instance representing the primitive type
+ * {@code byte}.
+ */
+ public static final Class<Byte> TYPE = (Class<Byte>) Class.getPrimitiveClass("byte");
+
+ /**
+ * Returns a new {@code String} object representing the
+ * specified {@code byte}. The radix is assumed to be 10.
+ *
+ * @param b the {@code byte} to be converted
+ * @return the string representation of the specified {@code byte}
+ * @see java.lang.Integer#toString(int)
+ */
+ public static String toString(byte b) {
+ return Integer.toString((int)b, 10);
+ }
+
+ private static class ByteCache {
+ private ByteCache(){}
+
+ static final Byte cache[] = new Byte[-(-128) + 127 + 1];
+
+ static {
+ for(int i = 0; i < cache.length; i++)
+ cache[i] = new Byte((byte)(i - 128));
+ }
+ }
+
+ /**
+ * Returns a {@code Byte} instance representing the specified
+ * {@code byte} value.
+ * If a new {@code Byte} instance is not required, this method
+ * should generally be used in preference to the constructor
+ * {@link #Byte(byte)}, as this method is likely to yield
+ * significantly better space and time performance by caching
+ * frequently requested values.
+ *
+ * @param b a byte value.
+ * @return a {@code Byte} instance representing {@code b}.
+ * @since 1.5
+ */
+ public static Byte valueOf(byte b) {
+ final int offset = 128;
+ return ByteCache.cache[(int)b + offset];
+ }
+
+ /**
+ * Parses the string argument as a signed {@code byte} in the
+ * radix specified by the second argument. The characters in the
+ * string must all be digits, of the specified radix (as
+ * determined by whether {@link java.lang.Character#digit(char,
+ * int)} returns a nonnegative value) except that the first
+ * character may be an ASCII minus sign {@code '-'}
+ * (<code>'\u002D'</code>) to indicate a negative value or an
+ * ASCII plus sign {@code '+'} (<code>'\u002B'</code>) to
+ * indicate a positive value. The resulting {@code byte} value is
+ * returned.
+ *
+ * <p>An exception of type {@code NumberFormatException} is
+ * thrown if any of the following situations occurs:
+ * <ul>
+ * <li> The first argument is {@code null} or is a string of
+ * length zero.
+ *
+ * <li> The radix is either smaller than {@link
+ * java.lang.Character#MIN_RADIX} or larger than {@link
+ * java.lang.Character#MAX_RADIX}.
+ *
+ * <li> Any character of the string is not a digit of the
+ * specified radix, except that the first character may be a minus
+ * sign {@code '-'} (<code>'\u002D'</code>) or plus sign
+ * {@code '+'} (<code>'\u002B'</code>) provided that the
+ * string is longer than length 1.
+ *
+ * <li> The value represented by the string is not a value of type
+ * {@code byte}.
+ * </ul>
+ *
+ * @param s the {@code String} containing the
+ * {@code byte}
+ * representation to be parsed
+ * @param radix the radix to be used while parsing {@code s}
+ * @return the {@code byte} value represented by the string
+ * argument in the specified radix
+ * @throws NumberFormatException If the string does
+ * not contain a parsable {@code byte}.
+ */
+ public static byte parseByte(String s, int radix)
+ throws NumberFormatException {
+ int i = Integer.parseInt(s, radix);
+ if (i < MIN_VALUE || i > MAX_VALUE)
+ throw new NumberFormatException(
+ "Value out of range. Value:\"" + s + "\" Radix:" + radix);
+ return (byte)i;
+ }
+
+ /**
+ * Parses the string argument as a signed decimal {@code
+ * byte}. The characters in the string must all be decimal digits,
+ * except that the first character may be an ASCII minus sign
+ * {@code '-'} (<code>'\u002D'</code>) to indicate a negative
+ * value or an ASCII plus sign {@code '+'}
+ * (<code>'\u002B'</code>) to indicate a positive value. The
+ * resulting {@code byte} value is returned, exactly as if the
+ * argument and the radix 10 were given as arguments to the {@link
+ * #parseByte(java.lang.String, int)} method.
+ *
+ * @param s a {@code String} containing the
+ * {@code byte} representation to be parsed
+ * @return the {@code byte} value represented by the
+ * argument in decimal
+ * @throws NumberFormatException if the string does not
+ * contain a parsable {@code byte}.
+ */
+ public static byte parseByte(String s) throws NumberFormatException {
+ return parseByte(s, 10);
+ }
+
+ /**
+ * Returns a {@code Byte} object holding the value
+ * extracted from the specified {@code String} when parsed
+ * with the radix given by the second argument. The first argument
+ * is interpreted as representing a signed {@code byte} in
+ * the radix specified by the second argument, exactly as if the
+ * argument were given to the {@link #parseByte(java.lang.String,
+ * int)} method. The result is a {@code Byte} object that
+ * represents the {@code byte} value specified by the string.
+ *
+ * <p> In other words, this method returns a {@code Byte} object
+ * equal to the value of:
+ *
+ * <blockquote>
+ * {@code new Byte(Byte.parseByte(s, radix))}
+ * </blockquote>
+ *
+ * @param s the string to be parsed
+ * @param radix the radix to be used in interpreting {@code s}
+ * @return a {@code Byte} object holding the value
+ * represented by the string argument in the
+ * specified radix.
+ * @throws NumberFormatException If the {@code String} does
+ * not contain a parsable {@code byte}.
+ */
+ public static Byte valueOf(String s, int radix)
+ throws NumberFormatException {
+ return new Byte(parseByte(s, radix));
+ }
+
+ /**
+ * Returns a {@code Byte} object holding the value
+ * given by the specified {@code String}. The argument is
+ * interpreted as representing a signed decimal {@code byte},
+ * exactly as if the argument were given to the {@link
+ * #parseByte(java.lang.String)} method. The result is a
+ * {@code Byte} object that represents the {@code byte}
+ * value specified by the string.
+ *
+ * <p> In other words, this method returns a {@code Byte} object
+ * equal to the value of:
+ *
+ * <blockquote>
+ * {@code new Byte(Byte.parseByte(s))}
+ * </blockquote>
+ *
+ * @param s the string to be parsed
+ * @return a {@code Byte} object holding the value
+ * represented by the string argument
+ * @throws NumberFormatException If the {@code String} does
+ * not contain a parsable {@code byte}.
+ */
+ public static Byte valueOf(String s) throws NumberFormatException {
+ return valueOf(s, 10);
+ }
+
+ /**
+ * Decodes a {@code String} into a {@code Byte}.
+ * Accepts decimal, hexadecimal, and octal numbers given by
+ * the following grammar:
+ *
+ * <blockquote>
+ * <dl>
+ * <dt><i>DecodableString:</i>
+ * <dd><i>Sign<sub>opt</sub> DecimalNumeral</i>
+ * <dd><i>Sign<sub>opt</sub></i> {@code 0x} <i>HexDigits</i>
+ * <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
+ * <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
+ * <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
+ * <p>
+ * <dt><i>Sign:</i>
+ * <dd>{@code -}
+ * <dd>{@code +}
+ * </dl>
+ * </blockquote>
+ *
+ * <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
+ * are defined in <a href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">§3.10.1</a>
+ * of the <a href="http://java.sun.com/docs/books/jls/html/">Java
+ * Language Specification</a>.
+ *
+ * <p>The sequence of characters following an optional
+ * sign and/or radix specifier ("{@code 0x}", "{@code 0X}",
+ * "{@code #}", or leading zero) is parsed as by the {@code
+ * Byte.parseByte} method with the indicated radix (10, 16, or 8).
+ * This sequence of characters must represent a positive value or
+ * a {@link NumberFormatException} will be thrown. The result is
+ * negated if first character of the specified {@code String} is
+ * the minus sign. No whitespace characters are permitted in the
+ * {@code String}.
+ *
+ * @param nm the {@code String} to decode.
+ * @return a {@code Byte} object holding the {@code byte}
+ * value represented by {@code nm}
+ * @throws NumberFormatException if the {@code String} does not
+ * contain a parsable {@code byte}.
+ * @see java.lang.Byte#parseByte(java.lang.String, int)
+ */
+ public static Byte decode(String nm) throws NumberFormatException {
+ int i = Integer.decode(nm);
+ if (i < MIN_VALUE || i > MAX_VALUE)
+ throw new NumberFormatException(
+ "Value " + i + " out of range from input " + nm);
+ return (byte)i;
+ }
+
+ /**
+ * The value of the {@code Byte}.
+ *
+ * @serial
+ */
+ private final byte value;
+
+ /**
+ * Constructs a newly allocated {@code Byte} object that
+ * represents the specified {@code byte} value.
+ *
+ * @param value the value to be represented by the
+ * {@code Byte}.
+ */
+ public Byte(byte value) {
+ this.value = value;
+ }
+
+ /**
+ * Constructs a newly allocated {@code Byte} object that
+ * represents the {@code byte} value indicated by the
+ * {@code String} parameter. The string is converted to a
+ * {@code byte} value in exactly the manner used by the
+ * {@code parseByte} method for radix 10.
+ *
+ * @param s the {@code String} to be converted to a
+ * {@code Byte}
+ * @throws NumberFormatException If the {@code String}
+ * does not contain a parsable {@code byte}.
+ * @see java.lang.Byte#parseByte(java.lang.String, int)
+ */
+ public Byte(String s) throws NumberFormatException {
+ this.value = parseByte(s, 10);
+ }
+
+ /**
+ * Returns the value of this {@code Byte} as a
+ * {@code byte}.
+ */
+ public byte byteValue() {
+ return value;
+ }
+
+ /**
+ * Returns the value of this {@code Byte} as a
+ * {@code short}.
+ */
+ public short shortValue() {
+ return (short)value;
+ }
+
+ /**
+ * Returns the value of this {@code Byte} as an
+ * {@code int}.
+ */
+ public int intValue() {
+ return (int)value;
+ }
+
+ /**
+ * Returns the value of this {@code Byte} as a
+ * {@code long}.
+ */
+ public long longValue() {
+ return (long)value;
+ }
+
+ /**
+ * Returns the value of this {@code Byte} as a
+ * {@code float}.
+ */
+ public float floatValue() {
+ return (float)value;
+ }
+
+ /**
+ * Returns the value of this {@code Byte} as a
+ * {@code double}.
+ */
+ public double doubleValue() {
+ return (double)value;
+ }
+
+ /**
+ * Returns a {@code String} object representing this
+ * {@code Byte}'s value. The value is converted to signed
+ * decimal representation and returned as a string, exactly as if
+ * the {@code byte} value were given as an argument to the
+ * {@link java.lang.Byte#toString(byte)} method.
+ *
+ * @return a string representation of the value of this object in
+ * base 10.
+ */
+ public String toString() {
+ return String.valueOf((int)value);
+ }
+
+ /**
+ * Returns a hash code for this {@code Byte}.
+ */
+ public int hashCode() {
+ return (int)value;
+ }
+
+ /**
+ * Compares this object to the specified object. The result is
+ * {@code true} if and only if the argument is not
+ * {@code null} and is a {@code Byte} object that
+ * contains the same {@code byte} value as this object.
+ *
+ * @param obj the object to compare with
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
+ */
+ public boolean equals(Object obj) {
+ if (obj instanceof Byte) {
+ return value == ((Byte)obj).byteValue();
+ }
+ return false;
+ }
+
+ /**
+ * Compares two {@code Byte} objects numerically.
+ *
+ * @param anotherByte the {@code Byte} to be compared.
+ * @return the value {@code 0} if this {@code Byte} is
+ * equal to the argument {@code Byte}; a value less than
+ * {@code 0} if this {@code Byte} is numerically less
+ * than the argument {@code Byte}; and a value greater than
+ * {@code 0} if this {@code Byte} is numerically
+ * greater than the argument {@code Byte} (signed
+ * comparison).
+ * @since 1.2
+ */
+ public int compareTo(Byte anotherByte) {
+ return this.value - anotherByte.value;
+ }
+
+ /**
+ * The number of bits used to represent a {@code byte} value in two's
+ * complement binary form.
+ *
+ * @since 1.5
+ */
+ public static final int SIZE = 8;
+
+ /** use serialVersionUID from JDK 1.1. for interoperability */
+ private static final long serialVersionUID = -7183698231559129828L;
+}
Added: trunk/core/src/openjdk/java/java/lang/Integer.java
===================================================================
--- trunk/core/src/openjdk/java/java/lang/Integer.java (rev 0)
+++ trunk/core/src/openjdk/java/java/lang/Integer.java 2007-06-17 07:09:54 UTC (rev 3265)
@@ -0,0 +1,1207 @@
+/*
+ * Copyright 1994-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.lang;
+
+/**
+ * The {@code Integer} class wraps a value of the primitive type
+ * {@code int} in an object. An object of type {@code Integer}
+ * contains a single field whose type is {@code int}.
+ *
+ * <p>In addition, this class provides several methods for converting
+ * an {@code int} to a {@code String} and a {@code String} to an
+ * {@code int}, as well as other constants and methods useful when
+ * dealing with an {@code int}.
+ *
+ * <p>Implementation note: The implementations of the "bit twiddling"
+ * methods (such as {@link #highestOneBit(int) highestOneBit} and
+ * {@link #numberOfTrailingZeros(int) numberOfTrailingZeros}) are
+ * based on material from Henry S. Warren, Jr.'s <i>Hacker's
+ * Delight</i>, (Addison Wesley, 2002).
+ *
+ * @author Lee Boynton
+ * @author Arthur van Hoff
+ * @author Josh Bloch
+ * @author Joseph D. Darcy
+ * @version 1.100, 05/05/07
+ * @since JDK1.0
+ */
+public final class Integer extends Number implements Comparable<Integer> {
+ /**
+ * A constant holding the minimum value an {@code int} can
+ * have, -2<sup>31</sup>.
+ */
+ public static final int MIN_VALUE = 0x80000000;
+
+ /**
+ * A constant holding the maximum value an {@code int} can
+ * have, 2<sup>31</sup>-1.
+ */
+ public static final int MAX_VALUE = 0x7fffffff;
+
+ /**
+ * The {@code Class} instance representing the primitive type
+ * {@code int}.
+ *
+ * @since JDK1.1
+ */
+ public static final Class<Integer> TYPE = (Class<Integer>) Class.getPrimitiveClass("int");
+
+ /**
+ * All possible chars for representing a number as a String
+ */
+ final static char[] digits = {
+ '0' , '1' , '2' , '3' , '4' , '5' ,
+ '6' , '7' , '8' , '9' , 'a' , 'b' ,
+ 'c' , 'd' , 'e' , 'f' , 'g' , 'h' ,
+ 'i' , 'j' , 'k' , 'l' , 'm' , 'n' ,
+ 'o' , 'p' , 'q' , 'r' , 's' , 't' ,
+ 'u' , 'v' , 'w' , 'x' , 'y' , 'z'
+ };
+
+ /**
+ * Returns a string representation of the first argument in the
+ * radix specified by the second argument.
+ *
+ * <p>If the radix is smaller than {@code Character.MIN_RADIX}
+ * or larger than {@code Character.MAX_RADIX}, then the radix
+ * {@code 10} is used instead.
+ *
+ * <p>If the first argument is negative, the first element of the
+ * result is the ASCII minus character {@code '-'}
+ * (<code>'\u002D'</code>). If the first argument is not
+ * negative, no sign character appears in the result.
+ *
+ * <p>The remaining characters of the result represent the magnitude
+ * of the first argume...
[truncated message content] |