Merge
This commit is contained in:
commit
99d4ee95ed
@ -35,3 +35,4 @@ ffd09e767dfa6d21466183a400f72cf62d53297f jdk7-b57
|
||||
59b497130f82ec809c245ffb5e521e3a5fabf8af jdk7-b58
|
||||
030142474602b4a067662fffc0c8e541de5a78df jdk7-b59
|
||||
39565502682c7085369bd09e51640919dc741097 jdk7-b60
|
||||
472c21584cfd7e9c0229ad6a100366a5c03d2976 jdk7-b61
|
||||
|
@ -72,6 +72,7 @@
|
||||
<li>Linux and Solaris:
|
||||
<ul>
|
||||
<li><a href="#cups">CUPS Include files</a> </li>
|
||||
<li><a href="#xrender">XRender Include files</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Linux only:
|
||||
@ -656,6 +657,9 @@
|
||||
<a href="#cups">CUPS Include files</a>, set
|
||||
<tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
|
||||
</li>
|
||||
<li>
|
||||
Install the <a href="#xrender">XRender Include files</a>.
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#jibx">JIBX Libraries</a>, set
|
||||
@ -1032,6 +1036,27 @@
|
||||
CUPS Header files.
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="xrender">XRender Extension Headers (Solaris & Linux)</a></h4>
|
||||
<blockquote>
|
||||
<p>
|
||||
<strong>Solaris:</strong>
|
||||
XRender header files are required for building the
|
||||
OpenJDK on Solaris.
|
||||
The XRender header file is included with the other X11 header files
|
||||
in the package <strong>SFWxwinc</strong> on new enough versions of
|
||||
Solaris and will be installed in
|
||||
<tt>/usr/X11/include/X11/extensions/Xrender.h</tt>
|
||||
</p><p>
|
||||
<strong>Linux:</strong>
|
||||
XRender header files are required for building the
|
||||
OpenJDK on Linux.
|
||||
The Linux header files are usually available from a "Xrender"
|
||||
development package, it's recommended that you try and use
|
||||
the package provided by the particular distribution of Linux that
|
||||
you are using.
|
||||
</p>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="freetype">FreeType 2</a></h4>
|
||||
<blockquote>
|
||||
Version 2.3 or newer of FreeType is required for building the OpenJDK.
|
||||
|
@ -35,3 +35,4 @@ bec82237d694f9802b820fa11bbb4f7fa9bf8e77 jdk7-b52
|
||||
2e3b8edab3ef55406494d3dd562e06882e6fc15e jdk7-b58
|
||||
7e6b2b55c00cc523b468272353ada3979adbbf16 jdk7-b59
|
||||
f1e1cccbd13aa96d2d8bd872782ff764010bc22c jdk7-b60
|
||||
e906b16a12a9a63b615898afa5d9673cbd1c5ab8 jdk7-b61
|
||||
|
@ -106,7 +106,12 @@ endif
|
||||
|
||||
SOURCE_LEVEL = 5
|
||||
BOOTSTRAP_TARGET_LEVEL = 5
|
||||
TARGET_LEVEL = 6
|
||||
|
||||
ifdef TARGET_CLASS_VERSION
|
||||
TARGET_LEVEL = $(TARGET_CLASS_VERSION)
|
||||
else
|
||||
TARGET_LEVEL = 6
|
||||
endif
|
||||
|
||||
ifndef TARGET_JAVA
|
||||
TARGET_JAVA = java
|
||||
|
@ -35,3 +35,4 @@ f4cbf78110c726919f46b59a3b054c54c7e889b4 jdk7-b57
|
||||
53d9bf689e80fcc76b221bbe6c5d58e08b80cbc6 jdk7-b58
|
||||
c55be0c7bd32c016c52218eb4c8b5da8a75450b5 jdk7-b59
|
||||
a77eddcd510c3972717c025cfcef9a60bfa4ecac jdk7-b60
|
||||
27b728fd1281ab62e9d7e4424f8bbb6ca438d803 jdk7-b61
|
||||
|
@ -35,3 +35,4 @@ e4851e9f7be26fc52a628be06ffa8aaea0919bd7 jdk7-b57
|
||||
13bf67d8c6341b841d268985cabaf747f2652bc8 jdk7-b58
|
||||
75113d7ce083048e7576b9d0d60a4e80db6b181f jdk7-b59
|
||||
259aef5045a155eb6a2f8dd0e2429c6dbe0f652f jdk7-b60
|
||||
f1ac756616eaaad795f77f7f5e7f7c7bfdc9c1de jdk7-b61
|
||||
|
@ -81,7 +81,15 @@ else
|
||||
ifdef JAVAC_TARGET_ARG
|
||||
ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SOURCE_LANGUAGE_VERSION
|
||||
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
|
||||
else
|
||||
ifdef JAVAC_SOURCE_ARG
|
||||
ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ALT_BOOTDIR
|
||||
ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
|
||||
|
@ -30,6 +30,7 @@
|
||||
# one of the standard user build.properties files (see build.xml)
|
||||
|
||||
# options for the <javac> tasks used to compile the tools
|
||||
javac.source = 5
|
||||
javac.target = 5
|
||||
javac.debug = true
|
||||
javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
|
@ -85,6 +85,7 @@
|
||||
destdir="${build.classes.dir}"
|
||||
memoryInitialSize="${javac.memoryInitialSize}"
|
||||
memoryMaximumSize="${javac.memoryMaximumSize}"
|
||||
source="${javac.source}"
|
||||
debug="${javac.debug}"
|
||||
target="${javac.target}">
|
||||
<compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
|
||||
|
@ -35,3 +35,4 @@ e0eebd978b830c09e7862cff3f77a914c15651c9 jdk7-b55
|
||||
5fb4fbea81c3609916da00417fdd15dbd9e39e97 jdk7-b58
|
||||
f64566bf4c2bc92e65ab2b9fab51b119f0d493d1 jdk7-b59
|
||||
3b054db3e277ca224fe6576c59ed6f4ab5ed0bb5 jdk7-b60
|
||||
aeabf802f2a1ca72b87d7397c5ece58058e000a9 jdk7-b61
|
||||
|
@ -83,6 +83,14 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SOURCE_LANGUAGE_VERSION
|
||||
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
|
||||
else
|
||||
ifdef JAVAC_SOURCE_ARG
|
||||
ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ALT_BOOTDIR
|
||||
ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
|
||||
endif
|
||||
|
@ -30,6 +30,7 @@
|
||||
# one of the standard user build.properties files (see build.xml)
|
||||
|
||||
# options for the <javac> tasks used to compile the tools
|
||||
javac.source = 5
|
||||
javac.target = 5
|
||||
javac.debug = true
|
||||
javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
|
@ -107,6 +107,7 @@
|
||||
destdir="${build.classes.dir}"
|
||||
memoryInitialSize="${javac.memoryInitialSize}"
|
||||
memoryMaximumSize="${javac.memoryMaximumSize}"
|
||||
source="${javac.source}"
|
||||
debug="${javac.debug}"
|
||||
target="${javac.target}"
|
||||
excludes="com/sun/tools/internal/txw2/**">
|
||||
|
@ -35,3 +35,4 @@ d5a1223e961891564de25c39fba6f2442d0fb045 jdk7-b57
|
||||
9ba256e2e5c161b89e638390f998baa175ec9abe jdk7-b58
|
||||
2a5a1b269e89f27ebe419ef4cf6e66a3face0df1 jdk7-b59
|
||||
0c3ef2d612a47667829eb17a192decef23f1c536 jdk7-b60
|
||||
f72c0dc047b9b2e797beee68ae0b50decb1f020d jdk7-b61
|
||||
|
@ -345,7 +345,6 @@ TOOLS = \
|
||||
sun/tools/jar \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
sun/tools/javap \
|
||||
sun/tools/jps \
|
||||
sun/tools/jstat \
|
||||
sun/tools/jstatd \
|
||||
@ -570,7 +569,6 @@ $(NOT_RT_JAR_LIST): FRC
|
||||
$(ECHO) "sun/tools/asm/" >> $@
|
||||
$(ECHO) "sun/tools/java/" >> $@
|
||||
$(ECHO) "sun/tools/javac/" >> $@
|
||||
$(ECHO) "sun/tools/javap/" >> $@
|
||||
$(ECHO) "com/sun/tools/classfile/" >> $@
|
||||
$(ECHO) "com/sun/tools/javap/" >> $@
|
||||
$(ECHO) "sun/tools/jconsole/" >> $@
|
||||
|
@ -40,6 +40,5 @@ IMPORT_TOOLS_PACKAGES += \
|
||||
com/sun/tools/javac \
|
||||
com/sun/tools/javadoc \
|
||||
com/sun/tools/javah \
|
||||
com/sun/tools/javap \
|
||||
sun/tools/javap
|
||||
com/sun/tools/javap
|
||||
|
||||
|
@ -91,6 +91,8 @@ ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
|
||||
|
||||
dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
|
||||
|
||||
# The language version we want for this jdk build
|
||||
SOURCE_LANGUAGE_VERSION=5
|
||||
# The class version we want for this jdk build
|
||||
TARGET_CLASS_VERSION=5
|
||||
|
||||
|
@ -123,7 +123,8 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true)
|
||||
endif
|
||||
|
||||
# Add the source level (currently all source is 1.5, should this be 1.6?)
|
||||
LANGUAGE_VERSION = -source 1.5
|
||||
SOURCE_LANGUAGE_VERSION = 5
|
||||
LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
|
||||
JAVACFLAGS += $(LANGUAGE_VERSION)
|
||||
|
||||
# Add the class version we want (currently this is 5, should it be 6 or even 7?)
|
||||
|
@ -645,7 +645,7 @@ tracingdocs:
|
||||
@# ######## api-tracing ############################
|
||||
$(RM) -r $(TRACING_DOCDIR)
|
||||
$(MKDIR) -p $(TRACING_DOCDIR)
|
||||
$(JAVADOC) $(TRACING_JAVADOCFLAGS) \
|
||||
$(JAVADOC_CMD) $(TRACING_JAVADOCFLAGS) \
|
||||
$(TRACING_PKGS)
|
||||
|
||||
.PHONY: httpserverdocs
|
||||
|
@ -827,8 +827,7 @@ CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
|
||||
|
||||
$(FILES_gensbcs_out): $(GENCSSRC)/SingleByte-X.java $(GENCSSRC)/sbcs
|
||||
@$(prep-target)
|
||||
$(BOOT_JAVA_CMD) -cp $(CHARSETMAPPING_JARFILE) build.tools.charsetmapping.GenerateSBCS \
|
||||
$(GENCSSRC) $(SCS_GEN) sbcs
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSSRC) $(SCS_GEN) sbcs
|
||||
|
||||
#
|
||||
# Generated file system implementation classes (Unix only)
|
||||
|
@ -76,6 +76,10 @@ FILES_java = \
|
||||
sun/text/Normalizer.java \
|
||||
sun/text/SupplementaryCharacterData.java \
|
||||
sun/text/UCompactIntArray.java \
|
||||
sun/text/bidi/BidiBase.java \
|
||||
sun/text/bidi/BidiLine.java \
|
||||
sun/text/bidi/BidiRun.java \
|
||||
\
|
||||
sun/text/normalizer/CharTrie.java \
|
||||
sun/text/normalizer/CharacterIteratorWrapper.java \
|
||||
sun/text/normalizer/ICUBinary.java \
|
||||
|
@ -50,6 +50,8 @@ PREFIX = 1.2
|
||||
JAVADOCFLAGS = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION)
|
||||
SWINGPKG = javax/swing
|
||||
LOCAL_JAVAC_FLAGS = $(OTHER_JAVACFLAGS)
|
||||
# since LOCAL_JAVADOC runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match
|
||||
DOCLET_JAVAC_FLAGS = -source 6 -target 6
|
||||
|
||||
include FILES.gmk
|
||||
include $(BUILDDIR)/common/Release.gmk
|
||||
@ -86,7 +88,7 @@ $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(DOCLETDST)::
|
||||
@$(MKDIR) -p $@
|
||||
|
||||
$(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
# To run, the doclet needs SwingBeanInfoBase class. Also Notice the lie
|
||||
@ -95,11 +97,11 @@ $(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
|
||||
.SwingBeanInfo: $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(SWINGPKG)/BeanInfoUtils.class $(SWINGPKG)/SwingBeanInfoBase.class
|
||||
|
||||
$(SWINGPKG)/BeanInfoUtils.class: $(BEANSRCDIR)/BeanInfoUtils.java
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
$(SWINGPKG)/SwingBeanInfoBase.class: $(BEANSRCDIR)/SwingBeanInfoBase.java $(BEANSRCDIR)/BeanInfoUtils.java
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
#
|
||||
|
@ -66,7 +66,7 @@ $(call make-launcher, jarsigner, sun.security.tools.JarSigner, , )
|
||||
$(call make-launcher, javac, com.sun.tools.javac.Main, , )
|
||||
$(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
|
||||
$(call make-launcher, javah, com.sun.tools.javah.Main, , )
|
||||
$(call make-launcher, javap, sun.tools.javap.Main, , )
|
||||
$(call make-launcher, javap, com.sun.tools.javap.Main, , )
|
||||
$(call make-launcher, jconsole, sun.tools.jconsole.JConsole, \
|
||||
-J-Djconsole.showOutputViewer, )
|
||||
$(call make-launcher, jdb, com.sun.tools.example.debug.tty.TTY, , )
|
||||
|
@ -58,11 +58,12 @@ ifdef OPENJDK
|
||||
else
|
||||
RENDER_SUBDIR = dcpr
|
||||
endif
|
||||
# nio need to be compiled before awt to have all charsets ready
|
||||
SUBDIRS = jar security javazic misc net audio $(RENDER_SUBDIR) image \
|
||||
awt splashscreen $(XAWT_SUBDIR) \
|
||||
nio awt splashscreen $(XAWT_SUBDIR) \
|
||||
$(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
|
||||
font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
|
||||
jawt text nio launcher management $(ORG_SUBDIR) \
|
||||
jawt text launcher management $(ORG_SUBDIR) \
|
||||
native2ascii serialver tools jconsole tracing
|
||||
|
||||
all build clean clobber::
|
||||
|
@ -24,10 +24,6 @@
|
||||
#
|
||||
|
||||
FILES_c_shared = \
|
||||
jbidi.c \
|
||||
ubidi.c \
|
||||
ubidiln.c \
|
||||
uchardir.c \
|
||||
DrawGlyphList.c \
|
||||
sunFont.c
|
||||
|
||||
|
@ -145,7 +145,6 @@ include $(BUILDDIR)/common/Library.gmk
|
||||
# Add to the ambient vpath to pick up files in subdirectories
|
||||
#
|
||||
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)
|
||||
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/bidi
|
||||
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/layout
|
||||
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
|
||||
|
||||
@ -187,7 +186,6 @@ endif # PLATFORM
|
||||
|
||||
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
|
||||
-I$(SHARE_SRC)/native/$(PKGDIR)/layout \
|
||||
-I$(SHARE_SRC)/native/$(PKGDIR)/bidi \
|
||||
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
|
||||
-I$(PLATFORM_SRC)/native/sun/awt \
|
||||
-I$(SHARE_SRC)/native/sun/awt/debug \
|
||||
|
@ -31,8 +31,6 @@ SUNWprivate_1.1 {
|
||||
newLayoutTableCache;
|
||||
freeLayoutTableCache;
|
||||
isNullScalerContext;
|
||||
Java_java_text_Bidi_nativeBidiChars;
|
||||
Java_java_text_Bidi_nativeGetDirectionCode;
|
||||
Java_sun_font_NullFontScaler_getNullScalerContext;
|
||||
Java_sun_font_NullFontScaler_getGlyphImage;
|
||||
Java_sun_font_FontManager_getPlatformFontVar;
|
||||
|
@ -33,8 +33,6 @@ SUNWprivate_1.1 {
|
||||
newLayoutTableCache;
|
||||
freeLayoutTableCache;
|
||||
isNullScalerContext;
|
||||
Java_java_text_Bidi_nativeBidiChars;
|
||||
Java_java_text_Bidi_nativeGetDirectionCode;
|
||||
Java_sun_font_NullFontScaler_getNullScalerContext;
|
||||
Java_sun_font_NullFontScaler_getGlyphImage;
|
||||
Java_sun_font_FontManager_getPlatformFontVar;
|
||||
|
@ -304,7 +304,7 @@ FILES_src = \
|
||||
sun/io/CharToByteMacUkraine.java \
|
||||
sun/io/CharToByteTIS620.java
|
||||
|
||||
FILES_gen_extsbcs = \
|
||||
FILES_gen_extcs = \
|
||||
sun/nio/cs/ext/IBM037.java \
|
||||
sun/nio/cs/ext/IBM1006.java \
|
||||
sun/nio/cs/ext/IBM1025.java \
|
||||
@ -374,6 +374,21 @@ FILES_gen_extsbcs = \
|
||||
sun/nio/cs/ext/MacThai.java \
|
||||
sun/nio/cs/ext/MacTurkish.java \
|
||||
sun/nio/cs/ext/MacUkraine.java \
|
||||
sun/nio/cs/ext/TIS_620.java
|
||||
sun/nio/cs/ext/TIS_620.java \
|
||||
sun/nio/cs/ext/EUC_TWMapping.java \
|
||||
sun/nio/cs/ext/IBM1381.java \
|
||||
sun/nio/cs/ext/IBM1383.java \
|
||||
sun/nio/cs/ext/IBM930.java \
|
||||
sun/nio/cs/ext/IBM933.java \
|
||||
sun/nio/cs/ext/IBM935.java \
|
||||
sun/nio/cs/ext/IBM937.java \
|
||||
sun/nio/cs/ext/IBM939.java \
|
||||
sun/nio/cs/ext/IBM942.java \
|
||||
sun/nio/cs/ext/IBM943.java \
|
||||
sun/nio/cs/ext/IBM948.java \
|
||||
sun/nio/cs/ext/IBM949.java \
|
||||
sun/nio/cs/ext/IBM950.java \
|
||||
sun/nio/cs/ext/IBM970.java
|
||||
|
||||
FILES_java = $(FILES_src) $(FILES_gen_extcs)
|
||||
|
||||
FILES_java = $(FILES_src) $(FILES_gen_extsbcs)
|
@ -60,15 +60,15 @@ endif # PLATFORM
|
||||
# this define is for the rule:
|
||||
CHARSETS_JAR = $(LIBDIR)/charsets.jar
|
||||
|
||||
# extsbcs
|
||||
FILES_genout_extsbcs = $(FILES_gen_extsbcs:%.java=$(GENSRCDIR)/%.java)
|
||||
# extcs
|
||||
FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
include $(BUILDDIR)/common/Classes.gmk
|
||||
|
||||
build: $(FILES_genout_extsbcs) $(CHARSETS_JAR)
|
||||
build: $(FILES_genout_extcs) $(CHARSETS_JAR)
|
||||
|
||||
#
|
||||
# Extra rules to build character converters.
|
||||
@ -77,6 +77,7 @@ SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
|
||||
SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
|
||||
|
||||
GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
|
||||
GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
|
||||
GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
|
||||
|
||||
FILES_MAP = $(GENCSDATASRC)/sjis0213.map
|
||||
@ -86,16 +87,18 @@ CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
|
||||
$(FILES_DAT): $(FILES_MAP)
|
||||
@$(prep-target)
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
|
||||
$(FILES_MAP) $(FILES_DAT)
|
||||
$(FILES_MAP) $(FILES_DAT) sjis0213
|
||||
|
||||
|
||||
$(FILES_genout_extsbcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/extsbcs
|
||||
$(FILES_genout_extcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/DoubleByte-X.java \
|
||||
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
|
||||
@$(prep-target)
|
||||
$(RM) -r $(GENCSEXT)
|
||||
$(MKDIR) -p $(GENCSEXT)
|
||||
$(BOOT_JAVA_CMD) -cp $(CHARSETMAPPING_JARFILE) build.tools.charsetmapping.GenerateSBCS \
|
||||
$(GENCSDATASRC) $(GENCSEXT) extsbcs
|
||||
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
|
||||
$(GENCSSRCDIR)/GenerateEUC_TW.java
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
|
||||
|
||||
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
|
||||
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
|
||||
|
100
jdk/make/tools/CharsetMapping/DoubleByte-X.java
Normal file
100
jdk/make/tools/CharsetMapping/DoubleByte-X.java
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright 2009 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.
|
||||
*/
|
||||
|
||||
// -- This file was mechanically generated: Do not edit! -- //
|
||||
|
||||
package $PACKAGE$;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.util.Arrays;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.ext.DoubleByte;
|
||||
|
||||
public class $NAME_CLZ$ extends Charset
|
||||
$IMPLEMENTS$
|
||||
{
|
||||
public $NAME_CLZ$() {
|
||||
super("$NAME_CS$", $NAME_ALIASES$);
|
||||
}
|
||||
|
||||
$HISTORICALNAME$
|
||||
|
||||
public boolean contains(Charset cs) {
|
||||
$CONTAINS$
|
||||
}
|
||||
|
||||
public CharsetDecoder newDecoder() {
|
||||
initb2c();
|
||||
return new DoubleByte.Decoder$DECTYPE$(this, b2c, b2cSB, $B2MIN$, $B2MAX$);
|
||||
}
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
initc2b();
|
||||
return new DoubleByte.Encoder$ENCTYPE$(this, c2b, c2bIndex);
|
||||
}
|
||||
|
||||
$B2C$
|
||||
static char[][] b2c = new char[b2cStr.length][];
|
||||
static char[] b2cSB;
|
||||
private static volatile boolean b2cInitialized = false;
|
||||
|
||||
static void initb2c() {
|
||||
if (b2cInitialized)
|
||||
return;
|
||||
synchronized (b2c) {
|
||||
if (b2cInitialized)
|
||||
return;
|
||||
for (int i = 0; i < b2cStr.length; i++) {
|
||||
if (b2cStr[i] == null)
|
||||
b2c[i] = DoubleByte.B2C_UNMAPPABLE;
|
||||
else
|
||||
b2c[i] = b2cStr[i].toCharArray();
|
||||
}
|
||||
b2cSB = b2cSBStr.toCharArray();
|
||||
b2cInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
static char[] c2b = new char[$C2BLENGTH$];
|
||||
static char[] c2bIndex = new char[0x100];
|
||||
private static volatile boolean c2bInitialized = false;
|
||||
|
||||
static void initc2b() {
|
||||
if (c2bInitialized)
|
||||
return;
|
||||
synchronized (c2b) {
|
||||
if (c2bInitialized)
|
||||
return;
|
||||
$NONROUNDTRIP_B2C$
|
||||
$NONROUNDTRIP_C2B$
|
||||
DoubleByte.Encoder.initC2B(b2cStr, b2cSBStr, b2cNR, c2bNR,
|
||||
$B2MIN$, $B2MAX$,
|
||||
c2b, c2bIndex);
|
||||
c2bInitialized = true;
|
||||
}
|
||||
}
|
||||
}
|
4
jdk/make/tools/CharsetMapping/IBM1381.c2b
Normal file
4
jdk/make/tools/CharsetMapping/IBM1381.c2b
Normal file
@ -0,0 +1,4 @@
|
||||
# See 4201529/4296969
|
||||
A1AA 2014
|
||||
A1A4 00B7
|
||||
A1A4 7AC2
|
9500
jdk/make/tools/CharsetMapping/IBM1381.map
Normal file
9500
jdk/make/tools/CharsetMapping/IBM1381.map
Normal file
File diff suppressed because it is too large
Load Diff
7
jdk/make/tools/CharsetMapping/IBM1383.c2b
Normal file
7
jdk/make/tools/CharsetMapping/IBM1383.c2b
Normal file
@ -0,0 +1,7 @@
|
||||
# See 4201529/4296969
|
||||
A1AA 2014
|
||||
A1A4 00B7
|
||||
A1A4 8EA2
|
||||
FEEE F83D
|
||||
FEF4 F83E
|
||||
|
9003
jdk/make/tools/CharsetMapping/IBM1383.map
Normal file
9003
jdk/make/tools/CharsetMapping/IBM1383.map
Normal file
File diff suppressed because it is too large
Load Diff
2
jdk/make/tools/CharsetMapping/IBM1383.nr
Normal file
2
jdk/make/tools/CharsetMapping/IBM1383.nr
Normal file
@ -0,0 +1,2 @@
|
||||
FEF4 4EDD
|
||||
FEEE FFE5
|
81
jdk/make/tools/CharsetMapping/IBM930.c2b
Normal file
81
jdk/make/tools/CharsetMapping/IBM930.c2b
Normal file
@ -0,0 +1,81 @@
|
||||
#
|
||||
# diff result of 03A234B0.TPMAP12A & 03A234B0.UXMAP120, with
|
||||
#
|
||||
# (1)added following entries from existing Cp930.java's c->b only
|
||||
# encoding result.
|
||||
#
|
||||
# 6be1 -> 54d4 -> 5516
|
||||
# 6d00 -> 5550 -> 6d9c
|
||||
# 70ff -> 52ec -> 4fa0
|
||||
# 841d -> 53e8 -> 8749
|
||||
# 841f -> 52a1 -> 874b
|
||||
# 8f91 -> 446e -> 2116
|
||||
# 92ca -> 547d -> 565b
|
||||
# 9b7e -> 53da -> 9a28
|
||||
# f86f -> 446e -> 2116
|
||||
#
|
||||
# (2)entries does not exist in "old"
|
||||
#
|
||||
# 51F1 6805
|
||||
# 53B3 8346
|
||||
#
|
||||
# (3)the 0x15 U+0085 entries for ebcdic
|
||||
#
|
||||
15 0085
|
||||
#
|
||||
54d4 6be1
|
||||
5550 6d00
|
||||
52ec 70ff
|
||||
53e8 841d
|
||||
52a1 841f
|
||||
446e 8f91
|
||||
547d 92ca
|
||||
53da 9b7e
|
||||
446e f86f
|
||||
#
|
||||
# we should use this one instead of the 4260<-ff0d
|
||||
#4260 2212
|
||||
4260 ff0d
|
||||
#
|
||||
426A 00A6
|
||||
43A1 301C
|
||||
444A 2014
|
||||
447C 2016
|
||||
4C7D 9E7C
|
||||
4EB3 9830
|
||||
4F5E 5861
|
||||
507F 91AC
|
||||
5190 56CA
|
||||
51F1 6805
|
||||
51FA 91B1
|
||||
5261 9EB4
|
||||
52A1 881F
|
||||
52C9 840A
|
||||
52DA 7E61
|
||||
52EC 4FE0
|
||||
5353 8EC0
|
||||
5373 7E6B
|
||||
53DA 9A52
|
||||
53E8 87EC
|
||||
53EE 7130
|
||||
53F8 8523
|
||||
5443 5C5B
|
||||
5464 9DD7
|
||||
547D 5699
|
||||
5481 525D
|
||||
54A3 6414
|
||||
54A4 7626
|
||||
54CA 7C1E
|
||||
54CD 6451
|
||||
54D4 555E
|
||||
54FA 6F51
|
||||
5550 7006
|
||||
5553 79B1
|
||||
555F 9EB5
|
||||
55C0 5C62
|
||||
55C1 985A
|
||||
5B72 6522
|
||||
5BFE 688E
|
||||
60F1 7E48
|
||||
61B0 8141
|
||||
66C8 9839
|
11897
jdk/make/tools/CharsetMapping/IBM930.map
Normal file
11897
jdk/make/tools/CharsetMapping/IBM930.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM930.nr
Normal file
1
jdk/make/tools/CharsetMapping/IBM930.nr
Normal file
@ -0,0 +1 @@
|
||||
25 000a
|
1
jdk/make/tools/CharsetMapping/IBM933.c2b
Normal file
1
jdk/make/tools/CharsetMapping/IBM933.c2b
Normal file
@ -0,0 +1 @@
|
||||
15 0085
|
10987
jdk/make/tools/CharsetMapping/IBM933.map
Normal file
10987
jdk/make/tools/CharsetMapping/IBM933.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM935.c2b
Normal file
1
jdk/make/tools/CharsetMapping/IBM935.c2b
Normal file
@ -0,0 +1 @@
|
||||
15 0085
|
9523
jdk/make/tools/CharsetMapping/IBM935.map
Normal file
9523
jdk/make/tools/CharsetMapping/IBM935.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM935.nr
Normal file
1
jdk/make/tools/CharsetMapping/IBM935.nr
Normal file
@ -0,0 +1 @@
|
||||
25 000a
|
8
jdk/make/tools/CharsetMapping/IBM937.c2b
Normal file
8
jdk/make/tools/CharsetMapping/IBM937.c2b
Normal file
@ -0,0 +1,8 @@
|
||||
15 0085
|
||||
#
|
||||
# see .map for more info regarding the following 5 entries
|
||||
#445C F83E
|
||||
#46A8 F83F
|
||||
#46A9 F840
|
||||
#46AA F841
|
||||
#46AB F842
|
20463
jdk/make/tools/CharsetMapping/IBM937.map
Normal file
20463
jdk/make/tools/CharsetMapping/IBM937.map
Normal file
File diff suppressed because it is too large
Load Diff
193
jdk/make/tools/CharsetMapping/IBM937.nr
Normal file
193
jdk/make/tools/CharsetMapping/IBM937.nr
Normal file
@ -0,0 +1,193 @@
|
||||
#
|
||||
25 000a
|
||||
#
|
||||
# following are from Cp937.nr
|
||||
454A 5341
|
||||
454C 5345
|
||||
4841 4E00
|
||||
4845 4E59
|
||||
4847 4E8C
|
||||
4849 4EBA
|
||||
484A 513F
|
||||
484B 5165
|
||||
484C 516B
|
||||
4850 51E0
|
||||
4851 51F5
|
||||
4852 5200
|
||||
4853 529B
|
||||
4855 5315
|
||||
4856 531A
|
||||
4858 5341
|
||||
4859 535C
|
||||
485B 5382
|
||||
485D 53C8
|
||||
485E 53E3
|
||||
485F 56D7
|
||||
4860 571F
|
||||
4861 58EB
|
||||
4863 5915
|
||||
4864 5927
|
||||
4865 5973
|
||||
4866 5B50
|
||||
4868 5BF8
|
||||
4869 5C0F
|
||||
486A 5C22
|
||||
486B 5C38
|
||||
486C 5C6E
|
||||
486D 5C71
|
||||
486F 5DE5
|
||||
4870 5DF1
|
||||
4871 5DFE
|
||||
4872 5E72
|
||||
4876 5EFE
|
||||
4877 5F0B
|
||||
4878 5F13
|
||||
487B 5F73
|
||||
487C 5FC3
|
||||
487D 6208
|
||||
487E 6236
|
||||
487F 624B
|
||||
4881 652F
|
||||
4883 6587
|
||||
4884 6597
|
||||
4885 65A4
|
||||
4886 65B9
|
||||
4888 65E5
|
||||
4889 66F0
|
||||
488A 6708
|
||||
488B 6728
|
||||
488C 6B20
|
||||
488D 6B62
|
||||
488E 6B79
|
||||
488F 6BB3
|
||||
4890 6BCB
|
||||
4891 6BD4
|
||||
4892 6BDB
|
||||
4893 6C0F
|
||||
4894 6C14
|
||||
4895 6C34
|
||||
4896 706B
|
||||
4897 722A
|
||||
4898 7236
|
||||
4899 723B
|
||||
489A 723F
|
||||
489B 7247
|
||||
489C 7259
|
||||
489D 725B
|
||||
489E 72AC
|
||||
489F 7384
|
||||
48A0 7389
|
||||
48A1 74DC
|
||||
48A2 74E6
|
||||
48A3 7518
|
||||
48A4 751F
|
||||
48A5 7528
|
||||
48A6 7530
|
||||
48A7 758B
|
||||
48AA 767D
|
||||
48AB 76AE
|
||||
48AC 76BF
|
||||
48AD 76EE
|
||||
48AE 77DB
|
||||
48AF 77E2
|
||||
48B0 77F3
|
||||
48B1 793A
|
||||
48B2 79B8
|
||||
48B3 79BE
|
||||
48B4 7A74
|
||||
48B5 7ACB
|
||||
48B6 7AF9
|
||||
48B7 7C73
|
||||
48B8 7CF8
|
||||
48B9 7F36
|
||||
48BA 7F51
|
||||
48BB 7F8A
|
||||
48BC 7FBD
|
||||
48BD 8001
|
||||
48BE 800C
|
||||
48BF 8012
|
||||
48C0 8033
|
||||
48C1 807F
|
||||
48C2 8089
|
||||
48C3 81E3
|
||||
48C4 81EA
|
||||
48C5 81F3
|
||||
48C6 81FC
|
||||
48C7 820C
|
||||
48C8 821B
|
||||
48C9 821F
|
||||
48CA 826E
|
||||
48CB 8272
|
||||
48CC 8278
|
||||
48CD 864D
|
||||
48CE 866B
|
||||
48CF 8840
|
||||
48D0 884C
|
||||
48D1 8863
|
||||
48D2 897E
|
||||
48D3 898B
|
||||
48D4 89D2
|
||||
48D5 8A00
|
||||
48D6 8C37
|
||||
48D7 8C46
|
||||
48D8 8C55
|
||||
48D9 8C78
|
||||
48DA 8C9D
|
||||
48DB 8D64
|
||||
48DC 8D70
|
||||
48DD 8DB3
|
||||
48DE 8EAB
|
||||
48DF 8ECA
|
||||
48E0 8F9B
|
||||
48E1 8FB0
|
||||
48E3 9091
|
||||
48E4 9149
|
||||
48E5 91C6
|
||||
48E6 91CC
|
||||
48E7 91D1
|
||||
48E8 9577
|
||||
48E9 9580
|
||||
48EA 961C
|
||||
48EC 96B9
|
||||
48ED 96E8
|
||||
48EE 9752
|
||||
48EF 975E
|
||||
48F0 9762
|
||||
48F1 9769
|
||||
48F2 97CB
|
||||
48F3 97ED
|
||||
48F4 97F3
|
||||
48F5 9801
|
||||
48F6 98A8
|
||||
48F7 98DB
|
||||
48F8 98DF
|
||||
48F9 9996
|
||||
48FA 9999
|
||||
48FB 99AC
|
||||
48FC 9AA8
|
||||
48FD 9AD8
|
||||
4941 9ADF
|
||||
4942 9B25
|
||||
4943 9B2F
|
||||
4944 9B32
|
||||
4945 9B3C
|
||||
4946 9B5A
|
||||
4947 9CE5
|
||||
4948 9E75
|
||||
4949 9E7F
|
||||
494A 9EA5
|
||||
494B 9EBB
|
||||
494C 9EC3
|
||||
494D 9ECD
|
||||
494E 9ED1
|
||||
494F 9EF9
|
||||
4950 9EFD
|
||||
4951 9F0E
|
||||
4952 9F13
|
||||
4953 9F20
|
||||
4954 9F3B
|
||||
4955 9F4A
|
||||
4956 9F52
|
||||
4957 9F8D
|
||||
4958 9F9C
|
||||
4959 9FA0
|
62
jdk/make/tools/CharsetMapping/IBM939.c2b
Normal file
62
jdk/make/tools/CharsetMapping/IBM939.c2b
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
15 0085
|
||||
#
|
||||
# diff of:
|
||||
# package2/939/03AB34B0.TPMAP12A
|
||||
# package2/939/03AB34B0.UPMAP13A
|
||||
#
|
||||
4260 2212
|
||||
426A 00A6
|
||||
43A1 301C
|
||||
444A 2014
|
||||
446E F86F
|
||||
447C 2016
|
||||
4C7D 9E7C
|
||||
4EB3 9830
|
||||
4F5E 5861
|
||||
507F 91AC
|
||||
5190 56CA
|
||||
51F1 6805
|
||||
51FA 91B1
|
||||
5261 9EB4
|
||||
52A1 881F
|
||||
52C9 840A
|
||||
52DA 7E61
|
||||
52EC 4FE0
|
||||
5353 8EC0
|
||||
5373 7E6B
|
||||
53B3 8346
|
||||
53DA 9A52
|
||||
53E8 87EC
|
||||
53EE 7130
|
||||
53F8 8523
|
||||
5443 5C5B
|
||||
5464 9DD7
|
||||
547D 5699
|
||||
5481 525D
|
||||
54A3 6414
|
||||
54A4 7626
|
||||
54CA 7C1E
|
||||
54CD 6451
|
||||
54D4 555E
|
||||
54FA 6F51
|
||||
5550 7006
|
||||
5553 79B1
|
||||
555F 9EB5
|
||||
55C0 5C62
|
||||
55C1 985A
|
||||
5B72 6522
|
||||
5BFE 688E
|
||||
60F1 7E48
|
||||
61B0 8141
|
||||
66C8 9839
|
||||
#
|
||||
# see .map for details for following entries
|
||||
54d4 6be1
|
||||
5550 6d00
|
||||
52ec 70ff
|
||||
53e8 841d
|
||||
52a1 841f
|
||||
446e 8f91
|
||||
547d 92ca
|
||||
53da 9b7e
|
11886
jdk/make/tools/CharsetMapping/IBM939.map
Normal file
11886
jdk/make/tools/CharsetMapping/IBM939.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM939.nr
Normal file
1
jdk/make/tools/CharsetMapping/IBM939.nr
Normal file
@ -0,0 +1 @@
|
||||
25 000a
|
84
jdk/make/tools/CharsetMapping/IBM942.c2b
Normal file
84
jdk/make/tools/CharsetMapping/IBM942.c2b
Normal file
@ -0,0 +1,84 @@
|
||||
# diff of
|
||||
# 03AE34B0.TPMAP110 (b2c)
|
||||
# 03AE34B0.UPMAP120 (c2b)
|
||||
# (1) removed "redundant" entries
|
||||
# 5C 005C
|
||||
# 7E 007E
|
||||
# (2) have following "incompatible" entries compared
|
||||
# to existing/old mappings
|
||||
#
|
||||
# (a) c->b only don't exist in old table
|
||||
# 2015 815c 2014
|
||||
# 2225 8161 2016
|
||||
# 6805 8df2 67f5
|
||||
# 8346 8c74 834a
|
||||
# ff0d 817c 2212
|
||||
# ff5e 8160 301c
|
||||
# ffe4 fa55 a6
|
||||
#
|
||||
# (b) c->b only don't exist in new table
|
||||
# 551e 90e4 8749
|
||||
# 6d00 93c0 6d9c
|
||||
# 6f1e 91cb 9a28
|
||||
# 70ff 8ba0 4fa0
|
||||
# 8741 88a0 5516
|
||||
# 8f91 fa59 2116
|
||||
# 92ca 8a9a 565b
|
||||
#
|
||||
# Warning: to compatible, added (b) into c2b table
|
||||
#
|
||||
90e4 551e
|
||||
93c0 6d00
|
||||
91cb 6f1e
|
||||
8ba0 70ff
|
||||
88a0 8741
|
||||
fa59 8f91
|
||||
8a9a 92ca
|
||||
#
|
||||
#
|
||||
#
|
||||
815C 2015
|
||||
8160 FF5E
|
||||
8161 2225
|
||||
817C FF0D
|
||||
88A0 555E
|
||||
898B 7130
|
||||
89A8 9DD7
|
||||
8A9A 5699
|
||||
8BA0 4FE0
|
||||
8BEB 8EC0
|
||||
8C71 7E6B
|
||||
8C74 8346
|
||||
8CB2 9E7C
|
||||
8D8D 9EB4
|
||||
8DF2 6805
|
||||
8EC6 5C62
|
||||
8F4A 7E61
|
||||
8FD3 8523
|
||||
8FDD 91AC
|
||||
90E4 87EC
|
||||
917E 6414
|
||||
9189 7626
|
||||
91CB 9A52
|
||||
925C 7C1E
|
||||
92CD 6451
|
||||
9355 5861
|
||||
935E 985A
|
||||
9398 79B1
|
||||
93C0 7006
|
||||
9458 56CA
|
||||
948D 525D
|
||||
94AC 6F51
|
||||
94AE 91B1
|
||||
966A 9830
|
||||
96CB 9EB5
|
||||
9789 840A
|
||||
9858 881F
|
||||
9BA0 5C5B
|
||||
9DB7 6522
|
||||
9E94 688E
|
||||
E379 7E48
|
||||
E445 8141
|
||||
E8F6 9839
|
||||
FA55 FFE4
|
||||
FA59 F86F
|
9344
jdk/make/tools/CharsetMapping/IBM942.map
Normal file
9344
jdk/make/tools/CharsetMapping/IBM942.map
Normal file
File diff suppressed because it is too large
Load Diff
9799
jdk/make/tools/CharsetMapping/IBM943.map
Normal file
9799
jdk/make/tools/CharsetMapping/IBM943.map
Normal file
File diff suppressed because it is too large
Load Diff
401
jdk/make/tools/CharsetMapping/IBM943.nr
Normal file
401
jdk/make/tools/CharsetMapping/IBM943.nr
Normal file
@ -0,0 +1,401 @@
|
||||
#
|
||||
# b->c only entries
|
||||
#
|
||||
8754 2160
|
||||
8755 2161
|
||||
8756 2162
|
||||
8757 2163
|
||||
8758 2164
|
||||
8759 2165
|
||||
875A 2166
|
||||
875B 2167
|
||||
875C 2168
|
||||
875D 2169
|
||||
8782 2116
|
||||
8784 2121
|
||||
878A 3231
|
||||
8790 2252
|
||||
8791 2261
|
||||
8792 222B
|
||||
8795 221A
|
||||
8796 22A5
|
||||
8797 2220
|
||||
879A 2235
|
||||
879B 2229
|
||||
879C 222A
|
||||
ED40 7E8A
|
||||
ED41 891C
|
||||
ED42 9348
|
||||
ED43 9288
|
||||
ED44 84DC
|
||||
ED45 4FC9
|
||||
ED46 70BB
|
||||
ED47 6631
|
||||
ED48 68C8
|
||||
ED49 92F9
|
||||
ED4A 66FB
|
||||
ED4B 5F45
|
||||
ED4C 4E28
|
||||
ED4D 4EE1
|
||||
ED4E 4EFC
|
||||
ED4F 4F00
|
||||
ED50 4F03
|
||||
ED51 4F39
|
||||
ED52 4F56
|
||||
ED53 4F92
|
||||
ED54 4F8A
|
||||
ED55 4F9A
|
||||
ED56 4F94
|
||||
ED57 4FCD
|
||||
ED58 5040
|
||||
ED59 5022
|
||||
ED5A 4FFF
|
||||
ED5B 501E
|
||||
ED5C 5046
|
||||
ED5D 5070
|
||||
ED5E 5042
|
||||
ED5F 5094
|
||||
ED60 50F4
|
||||
ED61 50D8
|
||||
ED62 514A
|
||||
ED63 5164
|
||||
ED64 519D
|
||||
ED65 51BE
|
||||
ED66 51EC
|
||||
ED67 5215
|
||||
ED68 529C
|
||||
ED69 52A6
|
||||
ED6A 52C0
|
||||
ED6B 52DB
|
||||
ED6C 5300
|
||||
ED6D 5307
|
||||
ED6E 5324
|
||||
ED6F 5372
|
||||
ED70 5393
|
||||
ED71 53B2
|
||||
ED72 53DD
|
||||
ED73 FA0E
|
||||
ED74 549C
|
||||
ED75 548A
|
||||
ED76 54A9
|
||||
ED77 54FF
|
||||
ED78 5586
|
||||
ED79 5759
|
||||
ED7A 5765
|
||||
ED7B 57AC
|
||||
ED7C 57C8
|
||||
ED7D 57C7
|
||||
ED7E FA0F
|
||||
ED80 FA10
|
||||
ED81 589E
|
||||
ED82 58B2
|
||||
ED83 590B
|
||||
ED84 5953
|
||||
ED85 595B
|
||||
ED86 595D
|
||||
ED87 5963
|
||||
ED88 59A4
|
||||
ED89 59BA
|
||||
ED8A 5B56
|
||||
ED8B 5BC0
|
||||
ED8C 752F
|
||||
ED8D 5BD8
|
||||
ED8E 5BEC
|
||||
ED8F 5C1E
|
||||
ED90 5CA6
|
||||
ED91 5CBA
|
||||
ED92 5CF5
|
||||
ED93 5D27
|
||||
ED94 5D53
|
||||
ED95 FA11
|
||||
ED96 5D42
|
||||
ED97 5D6D
|
||||
ED98 5DB8
|
||||
ED99 5DB9
|
||||
ED9A 5DD0
|
||||
ED9B 5F21
|
||||
ED9C 5F34
|
||||
ED9D 5F67
|
||||
ED9E 5FB7
|
||||
ED9F 5FDE
|
||||
EDA0 605D
|
||||
EDA1 6085
|
||||
EDA2 608A
|
||||
EDA3 60DE
|
||||
EDA4 60D5
|
||||
EDA5 6120
|
||||
EDA6 60F2
|
||||
EDA7 6111
|
||||
EDA8 6137
|
||||
EDA9 6130
|
||||
EDAA 6198
|
||||
EDAB 6213
|
||||
EDAC 62A6
|
||||
EDAD 63F5
|
||||
EDAE 6460
|
||||
EDAF 649D
|
||||
EDB0 64CE
|
||||
EDB1 654E
|
||||
EDB2 6600
|
||||
EDB3 6615
|
||||
EDB4 663B
|
||||
EDB5 6609
|
||||
EDB6 662E
|
||||
EDB7 661E
|
||||
EDB8 6624
|
||||
EDB9 6665
|
||||
EDBA 6657
|
||||
EDBB 6659
|
||||
EDBC FA12
|
||||
EDBD 6673
|
||||
EDBE 6699
|
||||
EDBF 66A0
|
||||
EDC0 66B2
|
||||
EDC1 66BF
|
||||
EDC2 66FA
|
||||
EDC3 670E
|
||||
EDC4 F929
|
||||
EDC5 6766
|
||||
EDC6 67BB
|
||||
EDC7 6852
|
||||
EDC8 67C0
|
||||
EDC9 6801
|
||||
EDCA 6844
|
||||
EDCB 68CF
|
||||
EDCC FA13
|
||||
EDCD 6968
|
||||
EDCE FA14
|
||||
EDCF 6998
|
||||
EDD0 69E2
|
||||
EDD1 6A30
|
||||
EDD2 6A6B
|
||||
EDD3 6A46
|
||||
EDD4 6A73
|
||||
EDD5 6A7E
|
||||
EDD6 6AE2
|
||||
EDD7 6AE4
|
||||
EDD8 6BD6
|
||||
EDD9 6C3F
|
||||
EDDA 6C5C
|
||||
EDDB 6C86
|
||||
EDDC 6C6F
|
||||
EDDD 6CDA
|
||||
EDDE 6D04
|
||||
EDDF 6D87
|
||||
EDE0 6D6F
|
||||
EDE1 6D96
|
||||
EDE2 6DAC
|
||||
EDE3 6DCF
|
||||
EDE4 6DF8
|
||||
EDE5 6DF2
|
||||
EDE6 6DFC
|
||||
EDE7 6E39
|
||||
EDE8 6E5C
|
||||
EDE9 6E27
|
||||
EDEA 6E3C
|
||||
EDEB 6EBF
|
||||
EDEC 6F88
|
||||
EDED 6FB5
|
||||
EDEE 6FF5
|
||||
EDEF 7005
|
||||
EDF0 7007
|
||||
EDF1 7028
|
||||
EDF2 7085
|
||||
EDF3 70AB
|
||||
EDF4 710F
|
||||
EDF5 7104
|
||||
EDF6 715C
|
||||
EDF7 7146
|
||||
EDF8 7147
|
||||
EDF9 FA15
|
||||
EDFA 71C1
|
||||
EDFB 71FE
|
||||
EDFC 72B1
|
||||
EE40 72BE
|
||||
EE41 7324
|
||||
EE42 FA16
|
||||
EE43 7377
|
||||
EE44 73BD
|
||||
EE45 73C9
|
||||
EE46 73D6
|
||||
EE47 73E3
|
||||
EE48 73D2
|
||||
EE49 7407
|
||||
EE4A 73F5
|
||||
EE4B 7426
|
||||
EE4C 742A
|
||||
EE4D 7429
|
||||
EE4E 742E
|
||||
EE4F 7462
|
||||
EE50 7489
|
||||
EE51 749F
|
||||
EE52 7501
|
||||
EE53 756F
|
||||
EE54 7682
|
||||
EE55 769C
|
||||
EE56 769E
|
||||
EE57 769B
|
||||
EE58 76A6
|
||||
EE59 FA17
|
||||
EE5A 7746
|
||||
EE5B 52AF
|
||||
EE5C 7821
|
||||
EE5D 784E
|
||||
EE5E 7864
|
||||
EE5F 787A
|
||||
EE60 7930
|
||||
EE61 FA18
|
||||
EE62 FA19
|
||||
EE63 FA1A
|
||||
EE64 7994
|
||||
EE65 FA1B
|
||||
EE66 799B
|
||||
EE67 7AD1
|
||||
EE68 7AE7
|
||||
EE69 FA1C
|
||||
EE6A 7AEB
|
||||
EE6B 7B9E
|
||||
EE6C FA1D
|
||||
EE6D 7D48
|
||||
EE6E 7D5C
|
||||
EE6F 7DB7
|
||||
EE70 7DA0
|
||||
EE71 7DD6
|
||||
EE72 7E52
|
||||
EE73 7F47
|
||||
EE74 7FA1
|
||||
EE75 FA1E
|
||||
EE76 8301
|
||||
EE77 8362
|
||||
EE78 837F
|
||||
EE79 83C7
|
||||
EE7A 83F6
|
||||
EE7B 8448
|
||||
EE7C 84B4
|
||||
EE7D 8553
|
||||
EE7E 8559
|
||||
EE80 856B
|
||||
EE81 FA1F
|
||||
EE82 85B0
|
||||
EE83 FA20
|
||||
EE84 FA21
|
||||
EE85 8807
|
||||
EE86 88F5
|
||||
EE87 8A12
|
||||
EE88 8A37
|
||||
EE89 8A79
|
||||
EE8A 8AA7
|
||||
EE8B 8ABE
|
||||
EE8C 8ADF
|
||||
EE8D FA22
|
||||
EE8E 8AF6
|
||||
EE8F 8B53
|
||||
EE90 8B7F
|
||||
EE91 8CF0
|
||||
EE92 8CF4
|
||||
EE93 8D12
|
||||
EE94 8D76
|
||||
EE95 FA23
|
||||
EE96 8ECF
|
||||
EE97 FA24
|
||||
EE98 FA25
|
||||
EE99 9067
|
||||
EE9A 90DE
|
||||
EE9B FA26
|
||||
EE9C 9115
|
||||
EE9D 9127
|
||||
EE9E 91DA
|
||||
EE9F 91D7
|
||||
EEA0 91DE
|
||||
EEA1 91ED
|
||||
EEA2 91EE
|
||||
EEA3 91E4
|
||||
EEA4 91E5
|
||||
EEA5 9206
|
||||
EEA6 9210
|
||||
EEA7 920A
|
||||
EEA8 923A
|
||||
EEA9 9240
|
||||
EEAA 923C
|
||||
EEAB 924E
|
||||
EEAC 9259
|
||||
EEAD 9251
|
||||
EEAE 9239
|
||||
EEAF 9267
|
||||
EEB0 92A7
|
||||
EEB1 9277
|
||||
EEB2 9278
|
||||
EEB3 92E7
|
||||
EEB4 92D7
|
||||
EEB5 92D9
|
||||
EEB6 92D0
|
||||
EEB7 FA27
|
||||
EEB8 92D5
|
||||
EEB9 92E0
|
||||
EEBA 92D3
|
||||
EEBB 9325
|
||||
EEBC 9321
|
||||
EEBD 92FB
|
||||
EEBE FA28
|
||||
EEBF 931E
|
||||
EEC0 92FF
|
||||
EEC1 931D
|
||||
EEC2 9302
|
||||
EEC3 9370
|
||||
EEC4 9357
|
||||
EEC5 93A4
|
||||
EEC6 93C6
|
||||
EEC7 93DE
|
||||
EEC8 93F8
|
||||
EEC9 9431
|
||||
EECA 9445
|
||||
EECB 9448
|
||||
EECC 9592
|
||||
EECD F9DC
|
||||
EECE FA29
|
||||
EECF 969D
|
||||
EED0 96AF
|
||||
EED1 9733
|
||||
EED2 973B
|
||||
EED3 9743
|
||||
EED4 974D
|
||||
EED5 974F
|
||||
EED6 9751
|
||||
EED7 9755
|
||||
EED8 9857
|
||||
EED9 9865
|
||||
EEDA FA2A
|
||||
EEDB FA2B
|
||||
EEDC 9927
|
||||
EEDD FA2C
|
||||
EEDE 999E
|
||||
EEDF 9A4E
|
||||
EEE0 9AD9
|
||||
EEE1 9ADC
|
||||
EEE2 9B75
|
||||
EEE3 9B72
|
||||
EEE4 9B8F
|
||||
EEE5 9BB1
|
||||
EEE6 9BBB
|
||||
EEE7 9C00
|
||||
EEE8 9D70
|
||||
EEE9 9D6B
|
||||
EEEA FA2D
|
||||
EEEB 9E19
|
||||
EEEC 9ED1
|
||||
EEEF 2170
|
||||
EEF0 2171
|
||||
EEF1 2172
|
||||
EEF2 2173
|
||||
EEF3 2174
|
||||
EEF4 2175
|
||||
EEF5 2176
|
||||
EEF6 2177
|
||||
EEF7 2178
|
||||
EEF8 2179
|
||||
EEF9 FFE2
|
||||
EEFA 00A6
|
||||
EEFB FF07
|
||||
EEFC FF02
|
||||
FA54 FFE2
|
||||
FA5B 2235
|
188
jdk/make/tools/CharsetMapping/IBM948.c2b
Normal file
188
jdk/make/tools/CharsetMapping/IBM948.c2b
Normal file
@ -0,0 +1,188 @@
|
||||
8C40 4E00
|
||||
8C41 4E59
|
||||
8C47 4E8C
|
||||
8C48 4EBA
|
||||
8C49 513F
|
||||
8C4A 5165
|
||||
8C4B 516B
|
||||
8C4C 51E0
|
||||
8C4D 5200
|
||||
8C4F 529B
|
||||
8C50 5315
|
||||
8C51 5341
|
||||
8C52 535C
|
||||
8C53 53C8
|
||||
8C66 53E3
|
||||
8C67 571F
|
||||
8C68 58EB
|
||||
8C69 5915
|
||||
8C6A 5927
|
||||
8C6B 5973
|
||||
8C6C 5B50
|
||||
8C6F 5BF8
|
||||
8C70 5C0F
|
||||
8C71 5C22
|
||||
8C72 5C38
|
||||
8C73 5C71
|
||||
8C75 5DE5
|
||||
8C76 5DF1
|
||||
8C79 5DFE
|
||||
8C7A 5E72
|
||||
8C7B 5EFE
|
||||
8C7C 5F0B
|
||||
8C7D 5F13
|
||||
8CA9 5345
|
||||
8CBE 5FC3
|
||||
8CBF 6208
|
||||
8CC0 6236
|
||||
8CC1 624B
|
||||
8CC3 652F
|
||||
8CC4 6587
|
||||
8CC5 6597
|
||||
8CC6 65A4
|
||||
8CC7 65B9
|
||||
8CC8 65E5
|
||||
8CC9 66F0
|
||||
8CCA 6708
|
||||
8CCB 6728
|
||||
8CCC 6B20
|
||||
8CCD 6B62
|
||||
8CCE 6B79
|
||||
8CCF 6BCB
|
||||
8CD0 6BD4
|
||||
8CD1 6BDB
|
||||
8CD2 6C0F
|
||||
8CD3 6C34
|
||||
8CD4 706B
|
||||
8CD5 722A
|
||||
8CD6 7236
|
||||
8CD7 723B
|
||||
8CD8 7247
|
||||
8CD9 7259
|
||||
8CDA 725B
|
||||
8CDB 72AC
|
||||
8D88 7384
|
||||
8D89 7389
|
||||
8D8A 74DC
|
||||
8D8B 74E6
|
||||
8D8C 7518
|
||||
8D8D 751F
|
||||
8D8E 7528
|
||||
8D90 7530
|
||||
8D94 758B
|
||||
8D95 767D
|
||||
8D96 76AE
|
||||
8D97 76BF
|
||||
8D98 76EE
|
||||
8D99 77DB
|
||||
8D9A 77E2
|
||||
8D9B 77F3
|
||||
8D9C 793A
|
||||
8D9D 79BE
|
||||
8D9E 7A74
|
||||
8D9F 7ACB
|
||||
8E6B 7AF9
|
||||
8E6C 7C73
|
||||
8E6D 7CF8
|
||||
8E6E 7F36
|
||||
8E6F 7F8A
|
||||
8E70 7FBD
|
||||
8E71 8001
|
||||
8E73 800C
|
||||
8E74 8012
|
||||
8E75 8033
|
||||
8E76 807F
|
||||
8E77 8089
|
||||
8E7A 81E3
|
||||
8E7B 81EA
|
||||
8E7C 81F3
|
||||
8E7D 81FC
|
||||
8E7E 820C
|
||||
8E80 821B
|
||||
8E81 821F
|
||||
8E82 826E
|
||||
8E83 8272
|
||||
8E85 866B
|
||||
8E86 8840
|
||||
8E87 884C
|
||||
8E88 8863
|
||||
8FC2 898B
|
||||
8FC3 89D2
|
||||
8FC4 8A00
|
||||
8FC5 8C37
|
||||
8FC6 8C46
|
||||
8FC7 8C55
|
||||
8FC8 8C9D
|
||||
8FC9 8D64
|
||||
8FCA 8D70
|
||||
8FCB 8DB3
|
||||
8FCC 8EAB
|
||||
8FCD 8ECA
|
||||
8FCE 8F9B
|
||||
8FCF 8FB0
|
||||
8FD5 9091
|
||||
8FDA 9149
|
||||
8FDB 91C6
|
||||
8FDC 91CC
|
||||
91D8 91D1
|
||||
91D9 9577
|
||||
91DA 9580
|
||||
91DB 961C
|
||||
91E1 96B9
|
||||
91E2 96E8
|
||||
91E3 9752
|
||||
91E4 975E
|
||||
93F1 9762
|
||||
93F2 9769
|
||||
93F3 97CB
|
||||
93F4 97ED
|
||||
93F5 97F3
|
||||
93F6 9801
|
||||
93F7 98A8
|
||||
93F8 98DB
|
||||
93F9 98DF
|
||||
93FA 9996
|
||||
93FB 9999
|
||||
968B 99AC
|
||||
968C 9AA8
|
||||
968D 9AD8
|
||||
968E 9B25
|
||||
968F 9B32
|
||||
9690 9B3C
|
||||
9942 9B5A
|
||||
9943 9CE5
|
||||
9944 9E75
|
||||
9945 9E7F
|
||||
9946 9EA5
|
||||
9947 9EBB
|
||||
9BA5 9EC3
|
||||
9BA6 9ECD
|
||||
9BA7 9ED1
|
||||
9DED 9F0E
|
||||
9DEE 9F13
|
||||
9DEF 9F20
|
||||
9FF9 9F3B
|
||||
9FFA 9F4A
|
||||
A24E 9F52
|
||||
A3BC 9F8D
|
||||
A3BD 9F9C
|
||||
A942 51F5
|
||||
A943 531A
|
||||
A944 5382
|
||||
A949 56D7
|
||||
A94B 5C6E
|
||||
A94C 5F73
|
||||
A95F 6BB3
|
||||
A961 6C14
|
||||
A962 723F
|
||||
A987 79B8
|
||||
A9E7 7F51
|
||||
A9E8 8278
|
||||
A9ED 864D
|
||||
A9EE 897E
|
||||
AB44 8C78
|
||||
B26C 9ADF
|
||||
B26D 9B2F
|
||||
B975 9EF9
|
||||
BCF5 9EFD
|
||||
C962 9FA0
|
20396
jdk/make/tools/CharsetMapping/IBM948.map
Normal file
20396
jdk/make/tools/CharsetMapping/IBM948.map
Normal file
File diff suppressed because it is too large
Load Diff
10237
jdk/make/tools/CharsetMapping/IBM949.map
Normal file
10237
jdk/make/tools/CharsetMapping/IBM949.map
Normal file
File diff suppressed because it is too large
Load Diff
188
jdk/make/tools/CharsetMapping/IBM950.c2b
Normal file
188
jdk/make/tools/CharsetMapping/IBM950.c2b
Normal file
@ -0,0 +1,188 @@
|
||||
A440 4E00
|
||||
A441 4E59
|
||||
A447 4E8C
|
||||
A448 4EBA
|
||||
A449 513F
|
||||
A44A 5165
|
||||
A44B 516B
|
||||
A44C 51E0
|
||||
A44D 5200
|
||||
A44F 529B
|
||||
A450 5315
|
||||
A451 5341
|
||||
A452 535C
|
||||
A453 53C8
|
||||
A466 53E3
|
||||
A467 571F
|
||||
A468 58EB
|
||||
A469 5915
|
||||
A46A 5927
|
||||
A46B 5973
|
||||
A46C 5B50
|
||||
A46F 5BF8
|
||||
A470 5C0F
|
||||
A471 5C22
|
||||
A472 5C38
|
||||
A473 5C71
|
||||
A475 5DE5
|
||||
A476 5DF1
|
||||
A479 5DFE
|
||||
A47A 5E72
|
||||
A47B 5EFE
|
||||
A47C 5F0B
|
||||
A47D 5F13
|
||||
A4CA 5345
|
||||
A4DF 5FC3
|
||||
A4E0 6208
|
||||
A4E1 6236
|
||||
A4E2 624B
|
||||
A4E4 652F
|
||||
A4E5 6587
|
||||
A4E6 6597
|
||||
A4E7 65A4
|
||||
A4E8 65B9
|
||||
A4E9 65E5
|
||||
A4EA 66F0
|
||||
A4EB 6708
|
||||
A4EC 6728
|
||||
A4ED 6B20
|
||||
A4EE 6B62
|
||||
A4EF 6B79
|
||||
A4F0 6BCB
|
||||
A4F1 6BD4
|
||||
A4F2 6BDB
|
||||
A4F3 6C0F
|
||||
A4F4 6C34
|
||||
A4F5 706B
|
||||
A4F6 722A
|
||||
A4F7 7236
|
||||
A4F8 723B
|
||||
A4F9 7247
|
||||
A4FA 7259
|
||||
A4FB 725B
|
||||
A4FC 72AC
|
||||
A5C8 7384
|
||||
A5C9 7389
|
||||
A5CA 74DC
|
||||
A5CB 74E6
|
||||
A5CC 7518
|
||||
A5CD 751F
|
||||
A5CE 7528
|
||||
A5D0 7530
|
||||
A5D4 758B
|
||||
A5D5 767D
|
||||
A5D6 76AE
|
||||
A5D7 76BF
|
||||
A5D8 76EE
|
||||
A5D9 77DB
|
||||
A5DA 77E2
|
||||
A5DB 77F3
|
||||
A5DC 793A
|
||||
A5DD 79BE
|
||||
A5DE 7A74
|
||||
A5DF 7ACB
|
||||
A6CB 7AF9
|
||||
A6CC 7C73
|
||||
A6CD 7CF8
|
||||
A6CE 7F36
|
||||
A6CF 7F8A
|
||||
A6D0 7FBD
|
||||
A6D1 8001
|
||||
A6D3 800C
|
||||
A6D4 8012
|
||||
A6D5 8033
|
||||
A6D6 807F
|
||||
A6D7 8089
|
||||
A6DA 81E3
|
||||
A6DB 81EA
|
||||
A6DC 81F3
|
||||
A6DD 81FC
|
||||
A6DE 820C
|
||||
A6DF 821B
|
||||
A6E0 821F
|
||||
A6E1 826E
|
||||
A6E2 8272
|
||||
A6E4 866B
|
||||
A6E5 8840
|
||||
A6E6 884C
|
||||
A6E7 8863
|
||||
A8A3 898B
|
||||
A8A4 89D2
|
||||
A8A5 8A00
|
||||
A8A6 8C37
|
||||
A8A7 8C46
|
||||
A8A8 8C55
|
||||
A8A9 8C9D
|
||||
A8AA 8D64
|
||||
A8AB 8D70
|
||||
A8AC 8DB3
|
||||
A8AD 8EAB
|
||||
A8AE 8ECA
|
||||
A8AF 8F9B
|
||||
A8B0 8FB0
|
||||
A8B6 9091
|
||||
A8BB 9149
|
||||
A8BC 91C6
|
||||
A8BD 91CC
|
||||
AAF7 91D1
|
||||
AAF8 9577
|
||||
AAF9 9580
|
||||
AAFA 961C
|
||||
AB41 96B9
|
||||
AB42 96E8
|
||||
AB43 9752
|
||||
AB44 975E
|
||||
ADB1 9762
|
||||
ADB2 9769
|
||||
ADB3 97CB
|
||||
ADB4 97ED
|
||||
ADB5 97F3
|
||||
ADB6 9801
|
||||
ADB7 98A8
|
||||
ADB8 98DB
|
||||
ADB9 98DF
|
||||
ADBA 9996
|
||||
ADBB 9999
|
||||
B0A8 99AC
|
||||
B0A9 9AA8
|
||||
B0AA 9AD8
|
||||
B0AB 9B25
|
||||
B0AC 9B32
|
||||
B0AD 9B3C
|
||||
B3BD 9B5A
|
||||
B3BE 9CE5
|
||||
B3BF 9E75
|
||||
B3C0 9E7F
|
||||
B3C1 9EA5
|
||||
B3C2 9EBB
|
||||
B6C0 9EC3
|
||||
B6C1 9ECD
|
||||
B6C2 9ED1
|
||||
B9A9 9F0E
|
||||
B9AA 9F13
|
||||
B9AB 9F20
|
||||
BBF3 9F3B
|
||||
BBF4 9F4A
|
||||
BEA6 9F52
|
||||
C073 9F8D
|
||||
C074 9F9C
|
||||
C942 51F5
|
||||
C943 531A
|
||||
C944 5382
|
||||
C949 56D7
|
||||
C94B 5C6E
|
||||
C94C 5F73
|
||||
C95F 6BB3
|
||||
C961 6C14
|
||||
C962 723F
|
||||
C9A8 79B8
|
||||
CA49 7F51
|
||||
CA4A 8278
|
||||
CA4F 864D
|
||||
CA50 897E
|
||||
CBA4 8C78
|
||||
D449 9ADF
|
||||
D44A 9B2F
|
||||
DCB0 9EF9
|
||||
E0EF 9EFD
|
||||
EFB6 9FA0
|
20393
jdk/make/tools/CharsetMapping/IBM950.map
Normal file
20393
jdk/make/tools/CharsetMapping/IBM950.map
Normal file
File diff suppressed because it is too large
Load Diff
18
jdk/make/tools/CharsetMapping/IBM970.c2b
Normal file
18
jdk/make/tools/CharsetMapping/IBM970.c2b
Normal file
@ -0,0 +1,18 @@
|
||||
A1A4 00B7
|
||||
A1A9 00AD
|
||||
A1AA 2015
|
||||
A1AD 223C
|
||||
A2A6 FF5E
|
||||
A2C1 2299
|
||||
A3DC 20A9
|
||||
#
|
||||
# see .map file for the info regarding following 3 entries
|
||||
#
|
||||
a1aa 6950
|
||||
a1a9 84f1
|
||||
a1ad cf7f
|
||||
|
||||
|
||||
|
||||
|
||||
|
8581
jdk/make/tools/CharsetMapping/IBM970.map
Normal file
8581
jdk/make/tools/CharsetMapping/IBM970.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ PROGRAM = charsetmapping
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/GenerateMapping.java
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/Main.java
|
||||
|
||||
#
|
||||
# Build tool jar rules.
|
||||
|
16
jdk/make/tools/CharsetMapping/dbcs
Normal file
16
jdk/make/tools/CharsetMapping/dbcs
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
#clzName csName hisName dbtype pkg ascii b1min b1max b2min b2max
|
||||
#
|
||||
IBM1381 x-IBM1381 Cp1381 basic sun.nio.cs.ext true 0x8c 0xf7 0xa1 0xfe
|
||||
IBM1383 x-IBM1383 Cp1383 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
|
||||
IBM930 x-IBM930 Cp930 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
|
||||
IBM933 x-IBM933 Cp933 ebcdic sun.nio.cs.ext false 0x40 0xdd 0x40 0xfe
|
||||
IBM935 x-IBM935 Cp935 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
|
||||
IBM937 x-IBM937 Cp937 ebcdic sun.nio.cs.ext false 0x40 0xe2 0x40 0xfe
|
||||
IBM939 x-IBM939 Cp939 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
|
||||
IBM942 x-IBM942 Cp942 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
|
||||
IBM943 x-IBM943 Cp943 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
|
||||
IBM948 x-IBM948 Cp948 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfc
|
||||
IBM949 x-IBM949 Cp949 basic sun.nio.cs.ext false 0x8f 0xfe 0xa1 0xfe
|
||||
IBM950 x-IBM950 Cp950 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfe
|
||||
IBM970 x-IBM970 Cp970 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
|
55446
jdk/make/tools/CharsetMapping/euc_tw.map
Normal file
55446
jdk/make/tools/CharsetMapping/euc_tw.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ import java.util.*;
|
||||
|
||||
public class CharsetMapping {
|
||||
public final static char UNMAPPABLE_DECODING = '\uFFFD';
|
||||
public final static int UNMAPPABLE_ENCODING = -1;
|
||||
public final static int UNMAPPABLE_ENCODING = 0xFFFD;
|
||||
|
||||
public static class Entry {
|
||||
public int bs; //byte sequence reps
|
||||
|
285
jdk/make/tools/src/build/tools/charsetmapping/GenerateDBCS.java
Normal file
285
jdk/make/tools/src/build/tools/charsetmapping/GenerateDBCS.java
Normal file
@ -0,0 +1,285 @@
|
||||
/*
|
||||
* Copyright 2009 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 build.tools.charsetmapping;
|
||||
import java.io.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
import java.util.Formatter;
|
||||
import java.util.regex.*;
|
||||
import java.nio.charset.*;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateDBCS {
|
||||
// pattern used by this class to read in mapping table
|
||||
static Pattern mPattern = Pattern.compile("(\\p{XDigit}++)\\s++(\\p{XDigit}++)(\\s++#.*)?");
|
||||
public static void genDBCS(String args[]) throws Exception {
|
||||
|
||||
Scanner s = new Scanner(new File(args[0], args[2]));
|
||||
while (s.hasNextLine()) {
|
||||
String line = s.nextLine();
|
||||
if (line.startsWith("#") || line.length() == 0)
|
||||
continue;
|
||||
String[] fields = line.split("\\s+");
|
||||
if (fields.length < 10) {
|
||||
System.err.println("Misconfiged sbcs line <" + line + ">?");
|
||||
continue;
|
||||
}
|
||||
String clzName = fields[0];
|
||||
String csName = fields[1];
|
||||
String hisName = ("null".equals(fields[2]))?null:fields[2];
|
||||
String type = fields[3].toUpperCase();
|
||||
if ("BASIC".equals(type))
|
||||
type = "";
|
||||
else
|
||||
type = "_" + type;
|
||||
String pkgName = fields[4];
|
||||
boolean isASCII = Boolean.valueOf(fields[5]);
|
||||
int b1Min = toInteger(fields[6]);
|
||||
int b1Max = toInteger(fields[7]);
|
||||
int b2Min = toInteger(fields[8]);
|
||||
int b2Max = toInteger(fields[9]);
|
||||
System.out.printf("%s,%s,%s,%b,%s%n", clzName, csName, hisName, isASCII, pkgName);
|
||||
genClass(args[0], args[1], "DoubleByte-X.java",
|
||||
clzName, csName, hisName, pkgName,
|
||||
isASCII, type,
|
||||
b1Min, b1Max, b2Min, b2Max);
|
||||
}
|
||||
}
|
||||
|
||||
private static int toInteger(String s) {
|
||||
if (s.startsWith("0x") || s.startsWith("0X"))
|
||||
return Integer.valueOf(s.substring(2), 16);
|
||||
else
|
||||
return Integer.valueOf(s);
|
||||
}
|
||||
|
||||
private static void outString(Formatter out,
|
||||
char[] cc, int off, int end,
|
||||
String closure)
|
||||
{
|
||||
while (off < end) {
|
||||
out.format(" \"");
|
||||
for (int j = 0; j < 8; j++) {
|
||||
if (off == end)
|
||||
break;
|
||||
char c = cc[off++];
|
||||
switch (c) {
|
||||
case '\b':
|
||||
out.format("\\b"); break;
|
||||
case '\t':
|
||||
out.format("\\t"); break;
|
||||
case '\n':
|
||||
out.format("\\n"); break;
|
||||
case '\f':
|
||||
out.format("\\f"); break;
|
||||
case '\r':
|
||||
out.format("\\r"); break;
|
||||
case '\"':
|
||||
out.format("\\\""); break;
|
||||
case '\'':
|
||||
out.format("\\'"); break;
|
||||
case '\\':
|
||||
out.format("\\\\"); break;
|
||||
default:
|
||||
out.format("\\u%04X", c & 0xffff);
|
||||
}
|
||||
}
|
||||
if (off == end)
|
||||
out.format("\" %s%n", closure);
|
||||
else
|
||||
out.format("\" + %n");
|
||||
}
|
||||
}
|
||||
|
||||
private static void outString(Formatter out,
|
||||
char[] db,
|
||||
int b1,
|
||||
int b2Min, int b2Max,
|
||||
String closure)
|
||||
{
|
||||
char[] cc = new char[b2Max - b2Min + 1];
|
||||
int off = 0;
|
||||
for (int b2 = b2Min; b2 <= b2Max; b2++) {
|
||||
cc[off++] = db[(b1 << 8) | b2];
|
||||
}
|
||||
outString(out, cc, 0, cc.length, closure);
|
||||
}
|
||||
|
||||
private static void genClass(String srcDir, String dstDir, String template,
|
||||
String clzName,
|
||||
String csName,
|
||||
String hisName,
|
||||
String pkgName,
|
||||
boolean isASCII,
|
||||
String type,
|
||||
int b1Min, int b1Max,
|
||||
int b2Min, int b2Max)
|
||||
throws Exception
|
||||
{
|
||||
|
||||
StringBuilder b2cSB = new StringBuilder();
|
||||
StringBuilder b2cNRSB = new StringBuilder();
|
||||
StringBuilder c2bNRSB = new StringBuilder();
|
||||
|
||||
char[] db = new char[0x10000];
|
||||
char[] c2bIndex = new char[0x100];
|
||||
int c2bOff = 0x100; // first 0x100 for unmappable segs
|
||||
|
||||
Arrays.fill(db, UNMAPPABLE_DECODING);
|
||||
Arrays.fill(c2bIndex, UNMAPPABLE_DECODING);
|
||||
|
||||
char[] b2cIndex = new char[0x100];
|
||||
Arrays.fill(b2cIndex, UNMAPPABLE_DECODING);
|
||||
|
||||
// (1)read in .map to parse all b->c entries
|
||||
FileInputStream in = new FileInputStream(new File(srcDir, clzName + ".map"));
|
||||
Parser p = new Parser(in, mPattern);
|
||||
Entry e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
db[e.bs] = (char)e.cp;
|
||||
|
||||
if (e.bs > 0x100 && // db
|
||||
b2cIndex[e.bs>>8] == UNMAPPABLE_DECODING) {
|
||||
b2cIndex[e.bs>>8] = 1;
|
||||
}
|
||||
|
||||
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
|
||||
c2bOff += 0x100;
|
||||
c2bIndex[e.cp>>8] = 1;
|
||||
}
|
||||
}
|
||||
Formatter fm = new Formatter(b2cSB);
|
||||
fm.format("%n static final String b2cSBStr =%n");
|
||||
outString(fm, db, 0x00, 0x100, ";");
|
||||
|
||||
fm.format("%n static final String[] b2cStr = {%n");
|
||||
for (int i = 0; i < 0x100; i++) {
|
||||
if (b2cIndex[i] == UNMAPPABLE_DECODING) {
|
||||
fm.format(" null,%n"); //unmappable segments
|
||||
} else {
|
||||
outString(fm, db, i, b2Min, b2Max, ",");
|
||||
}
|
||||
}
|
||||
|
||||
fm.format(" };%n");
|
||||
fm.close();
|
||||
|
||||
// (2)now parse the .nr file which includes "b->c" non-roundtrip entries
|
||||
File f = new File(srcDir, clzName + ".nr");
|
||||
if (f.exists()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
in = new FileInputStream(f);
|
||||
p = new Parser(in, mPattern);
|
||||
e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
// A <b,c> pair
|
||||
sb.append((char)e.bs);
|
||||
sb.append((char)e.cp);
|
||||
}
|
||||
char[] nr = sb.toString().toCharArray();
|
||||
fm = new Formatter(b2cNRSB);
|
||||
fm.format("String b2cNR =%n");
|
||||
outString(fm, nr, 0, nr.length, ";");
|
||||
fm.close();
|
||||
} else {
|
||||
b2cNRSB.append("String b2cNR = null;");
|
||||
}
|
||||
|
||||
// (3)finally the .c2b file which includes c->b non-roundtrip entries
|
||||
f = new File(srcDir, clzName + ".c2b");
|
||||
if (f.exists()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
in = new FileInputStream(f);
|
||||
p = new Parser(in, mPattern);
|
||||
e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
// A <b,c> pair
|
||||
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
|
||||
c2bOff += 0x100;
|
||||
c2bIndex[e.cp>>8] = 1;
|
||||
}
|
||||
sb.append((char)e.bs);
|
||||
sb.append((char)e.cp);
|
||||
}
|
||||
char[] nr = sb.toString().toCharArray();
|
||||
fm = new Formatter(c2bNRSB);
|
||||
fm.format("String c2bNR =%n");
|
||||
outString(fm, nr, 0, nr.length, ";");
|
||||
fm.close();
|
||||
} else {
|
||||
c2bNRSB.append("String c2bNR = null;");
|
||||
}
|
||||
|
||||
// (4)it's time to generate the source file
|
||||
String b2c = b2cSB.toString();
|
||||
String b2cNR = b2cNRSB.toString();
|
||||
String c2bNR = c2bNRSB.toString();
|
||||
|
||||
Scanner s = new Scanner(new File(srcDir, template));
|
||||
PrintStream out = new PrintStream(new FileOutputStream(
|
||||
new File(dstDir, clzName + ".java")));
|
||||
if (hisName == null)
|
||||
hisName = "";
|
||||
|
||||
while (s.hasNextLine()) {
|
||||
String line = s.nextLine();
|
||||
if (line.indexOf("$") == -1) {
|
||||
out.println(line);
|
||||
continue;
|
||||
}
|
||||
line = line.replace("$PACKAGE$" , pkgName)
|
||||
.replace("$IMPLEMENTS$", (hisName == null)?
|
||||
"" : "implements HistoricallyNamedCharset")
|
||||
.replace("$NAME_CLZ$", clzName)
|
||||
.replace("$NAME_ALIASES$",
|
||||
"sun.nio.cs".equals(pkgName) ?
|
||||
"StandardCharsets.aliases_" + clzName :
|
||||
"ExtendedCharsets.aliasesFor(\"" + csName + "\")")
|
||||
.replace("$NAME_CS$" , csName)
|
||||
.replace("$CONTAINS$", isASCII ?
|
||||
" return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof "
|
||||
+ clzName + "));":
|
||||
" return (cs instanceof " + clzName + ");")
|
||||
.replace("$HISTORICALNAME$",
|
||||
(hisName == null)? "" :
|
||||
" public String historicalName() { return \"" + hisName + "\"; }")
|
||||
.replace("$DECTYPE$", type)
|
||||
.replace("$ENCTYPE$", type)
|
||||
.replace("$B1MIN$" , "0x" + Integer.toString(b1Min, 16))
|
||||
.replace("$B1MAX$" , "0x" + Integer.toString(b1Max, 16))
|
||||
.replace("$B2MIN$" , "0x" + Integer.toString(b2Min, 16))
|
||||
.replace("$B2MAX$" , "0x" + Integer.toString(b2Max, 16))
|
||||
.replace("$B2C$", b2c)
|
||||
.replace("$C2BLENGTH$", "0x" + Integer.toString(c2bOff, 16))
|
||||
.replace("$NONROUNDTRIP_B2C$", b2cNR)
|
||||
.replace("$NONROUNDTRIP_C2B$", c2bNR);
|
||||
|
||||
out.println(line);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
}
|
@ -0,0 +1,246 @@
|
||||
/*
|
||||
* Copyright 2009 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 build.tools.charsetmapping;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
import java.util.Formatter;
|
||||
import java.util.regex.*;
|
||||
import java.nio.charset.*;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateEUC_TW {
|
||||
|
||||
public static void genEUC_TW(String args[]) throws Exception {
|
||||
genClass(new FileInputStream(new File(args[0], "euc_tw.map")),
|
||||
new PrintStream(new File(args[1], "EUC_TWMapping.java"), "ISO-8859-1"),
|
||||
getCopyright(new File(args[3])));
|
||||
}
|
||||
|
||||
private static String getCopyright(File f) throws IOException {
|
||||
Scanner s = new Scanner(f, "ISO-8859-1");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (s.hasNextLine()) {
|
||||
String ln = s.nextLine();
|
||||
sb.append(ln + "\n");
|
||||
// assume we have the copyright as the first comment
|
||||
if (ln.matches("^\\s\\*\\/$"))
|
||||
break;
|
||||
}
|
||||
s.close();
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static char[] toCharArray(int[] db,
|
||||
int b1Min, int b1Max,
|
||||
int b2Min, int b2Max)
|
||||
{
|
||||
char[] ca = new char[(b1Max - b1Min + 1) * (b2Max - b2Min + 1)];
|
||||
int off = 0;
|
||||
for (int b1 = b1Min; b1 <= b1Max; b1++) {
|
||||
for (int b2 = b2Min; b2 <= b2Max; b2++) {
|
||||
ca[off++] = (char)(db[b1 * 256 + b2] & 0xffff);
|
||||
}
|
||||
}
|
||||
return ca;
|
||||
}
|
||||
|
||||
private static void toChar(Formatter out, String fmt, char c) {
|
||||
switch (c) {
|
||||
case '\b':
|
||||
out.format("\\b"); break;
|
||||
case '\t':
|
||||
out.format("\\t"); break;
|
||||
case '\n':
|
||||
out.format("\\n"); break;
|
||||
case '\f':
|
||||
out.format("\\f"); break;
|
||||
case '\r':
|
||||
out.format("\\r"); break;
|
||||
case '\"':
|
||||
out.format("\\\""); break;
|
||||
case '\'':
|
||||
out.format("\\'"); break;
|
||||
case '\\':
|
||||
out.format("\\\\"); break;
|
||||
default:
|
||||
out.format(fmt, c & 0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
private static void toString(Formatter out, char[] date, String endStr)
|
||||
{
|
||||
int off = 0;
|
||||
int end = date.length;
|
||||
while (off < end) {
|
||||
out.format(" \"");
|
||||
for (int j = 0; j < 8 && off < end; j++) {
|
||||
toChar(out, "\\u%04X", date[off++]);
|
||||
}
|
||||
if (off == end)
|
||||
out.format("\"%s%n", endStr);
|
||||
else
|
||||
out.format("\" +%n");
|
||||
}
|
||||
}
|
||||
|
||||
private static char[] toCharArray(byte[] ba,
|
||||
int b1Min, int b1Max,
|
||||
int b2Min, int b2Max)
|
||||
{
|
||||
char[] ca = new char[(b1Max - b1Min + 1) * (b2Max - b2Min + 1)];
|
||||
int off = 0;
|
||||
for (int b1 = b1Min; b1 <= b1Max; b1++) {
|
||||
int b2 = b2Min;
|
||||
while (b2 <= b2Max) {
|
||||
ca[off++] = (char)(((ba[b1 * 256 + b2++] & 0xff) << 8) |
|
||||
(ba[b1 * 256 + b2++] & 0xff));
|
||||
}
|
||||
}
|
||||
return ca;
|
||||
}
|
||||
|
||||
private static void toCharArray(Formatter out, char[] date) {
|
||||
int off = 0;
|
||||
int end = date.length;
|
||||
while (off < end) {
|
||||
out.format(" ");
|
||||
for (int j = 0; j < 8 && off < end; j++) {
|
||||
toChar(out, "'\\u%04X',", date[off++]);
|
||||
}
|
||||
out.format("%n");
|
||||
}
|
||||
}
|
||||
|
||||
private static int initC2BIndex(char[] index) {
|
||||
int off = 0;
|
||||
for (int i = 0; i < index.length; i++) {
|
||||
if (index[i] != 0) {
|
||||
index[i] = (char)off;
|
||||
off += 0x100;
|
||||
} else {
|
||||
index[i] = CharsetMapping.UNMAPPABLE_ENCODING;
|
||||
}
|
||||
}
|
||||
return off;
|
||||
}
|
||||
|
||||
private static Pattern euctw = Pattern.compile("(?:8ea)?(\\p{XDigit}++)\\s++(\\p{XDigit}++)?\\s*+.*");
|
||||
|
||||
private static void genClass(InputStream is, PrintStream ps, String copyright)
|
||||
throws Exception
|
||||
{
|
||||
// ranges of byte1 and byte2, something should come from a "config" file
|
||||
int b1Min = 0xa1;
|
||||
int b1Max = 0xfe;
|
||||
int b2Min = 0xa1;
|
||||
int b2Max = 0xfe;
|
||||
|
||||
try {
|
||||
int[][] db = new int[8][0x10000]; // doublebyte
|
||||
byte[] suppFlag = new byte[0x10000]; // doublebyte
|
||||
char[] indexC2B = new char[256];
|
||||
char[] indexC2BSupp = new char[256];
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int j = 0; j < 0x10000; j++)
|
||||
db[i][j] = CharsetMapping.UNMAPPABLE_DECODING;
|
||||
|
||||
CharsetMapping.Parser p = new CharsetMapping.Parser(is, euctw);
|
||||
CharsetMapping.Entry e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
int plane = 0;
|
||||
if (e.bs >= 0x10000) {
|
||||
plane = ((e.bs >> 16) & 0xff) - 1;
|
||||
if (plane >= 14)
|
||||
plane = 7;
|
||||
e.bs = e.bs & 0xffff;
|
||||
}
|
||||
db[plane][e.bs] = e.cp;
|
||||
if (e.cp < 0x10000) {
|
||||
indexC2B[e.cp>>8] = 1;
|
||||
} else {
|
||||
indexC2BSupp[(e.cp&0xffff)>>8] = 1;
|
||||
suppFlag[e.bs] |= (1 << plane);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
Formatter fm = new Formatter(out);
|
||||
|
||||
fm.format(copyright);
|
||||
fm.format("%n// -- This file was mechanically generated: Do not edit! -- //%n");
|
||||
fm.format("package sun.nio.cs.ext;%n%n");
|
||||
fm.format("class EUC_TWMapping {%n%n");
|
||||
|
||||
// boundaries
|
||||
fm.format(" final static int b1Min = 0x%x;%n", b1Min);
|
||||
fm.format(" final static int b1Max = 0x%x;%n", b1Max);
|
||||
fm.format(" final static int b2Min = 0x%x;%n", b2Min);
|
||||
fm.format(" final static int b2Max = 0x%x;%n", b2Max);
|
||||
|
||||
// b2c tables
|
||||
fm.format("%n final static String[] b2c = {%n");
|
||||
for (int plane = 0; plane < 8; plane++) {
|
||||
fm.format(" // Plane %d%n", plane);
|
||||
toString(fm, toCharArray(db[plane],
|
||||
b1Min, b1Max, b2Min, b2Max),
|
||||
",");
|
||||
fm.format("%n");
|
||||
}
|
||||
fm.format(" };%n");
|
||||
|
||||
// c2bIndex
|
||||
fm.format("%n static final int C2BSIZE = 0x%x;%n",
|
||||
initC2BIndex(indexC2B));
|
||||
fm.format("%n static char[] c2bIndex = new char[] {%n");
|
||||
toCharArray(fm, indexC2B);
|
||||
fm.format(" };%n");
|
||||
|
||||
// c2bIndexSupp
|
||||
fm.format("%n static final int C2BSUPPSIZE = 0x%x;%n",
|
||||
initC2BIndex(indexC2BSupp));
|
||||
fm.format("%n static char[] c2bSuppIndex = new char[] {%n");
|
||||
toCharArray(fm, indexC2BSupp);
|
||||
fm.format(" };%n");
|
||||
|
||||
// suppFlags
|
||||
fm.format("%n static String b2cIsSuppStr =%n");
|
||||
toString(fm, toCharArray(suppFlag,
|
||||
b1Min, b1Max, b2Min, b2Max),
|
||||
";");
|
||||
|
||||
fm.format("}");
|
||||
fm.close();
|
||||
|
||||
ps.println(out.toString());
|
||||
ps.close();
|
||||
} catch (Exception x) {
|
||||
x.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -27,15 +27,11 @@ package build.tools.charsetmapping;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.regex.*;
|
||||
import build.tools.charsetmapping.GenerateSBCS;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateMapping {
|
||||
public static void main(String argv[]) throws IOException {
|
||||
if (argv.length < 2) {
|
||||
System.out.println("Usage: java GenerateMapping fMap fDat");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
public static void genMapping(String argv[]) throws IOException {
|
||||
genDataJIS0213(new FileInputStream(argv[0]),
|
||||
new FileOutputStream(argv[1]));
|
||||
}
|
||||
|
@ -34,11 +34,8 @@ import java.nio.charset.*;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateSBCS {
|
||||
public static void main(String args[]) throws Exception {
|
||||
if (args.length < 3) {
|
||||
System.err.println("Usage: java GenSBCS srcDir dstDir config");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
public static void genSBCS(String args[]) throws Exception {
|
||||
|
||||
Scanner s = new Scanner(new File(args[0], args[2]));
|
||||
while (s.hasNextLine()) {
|
||||
|
54
jdk/make/tools/src/build/tools/charsetmapping/Main.java
Normal file
54
jdk/make/tools/src/build/tools/charsetmapping/Main.java
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009 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 build.tools.charsetmapping;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
if (args.length < 3 ) {
|
||||
System.out.println("Usage: java -jar charsetmapping.jar src dst mType...");
|
||||
System.exit(1);
|
||||
}
|
||||
if ("sbcs".equals(args[2]) || "extsbcs".equals(args[2])) {
|
||||
GenerateSBCS.genSBCS(args);
|
||||
} else if ("dbcs".equals(args[2])) {
|
||||
GenerateDBCS.genDBCS(args);
|
||||
|
||||
} else if ("euctw".equals(args[2])) {
|
||||
if (args.length != 4) {
|
||||
System.out.println("Usage: java -jar charsetmapping.jar srcDir dstDir euctw copyrightSrc");
|
||||
System.exit(1);
|
||||
}
|
||||
GenerateEUC_TW.genEUC_TW(args);
|
||||
} else if ("sjis0213".equals(args[2])) {
|
||||
GenerateMapping.genMapping(args);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-2009 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
|
||||
@ -148,8 +148,12 @@ public class TextCallbackHandler implements CallbackHandler {
|
||||
|
||||
/* Reads a line of input */
|
||||
private String readLine() throws IOException {
|
||||
return new BufferedReader
|
||||
String result = new BufferedReader
|
||||
(new InputStreamReader(System.in)).readLine();
|
||||
if (result == null) {
|
||||
throw new IOException("Cannot read from System.in");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void doConfirmation(ConfirmationCallback confirmation)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-2009 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
|
||||
@ -1516,11 +1516,6 @@ abstract class DigestMD5Base extends AbstractSaslImpl {
|
||||
|
||||
// ---------------- DES and 3 DES key manipulation routines
|
||||
|
||||
/* Mask used to check for parity adjustment */
|
||||
private static final byte[] PARITY_BIT_MASK = {
|
||||
(byte)0x80, (byte)0x40, (byte)0x20, (byte)0x10,
|
||||
(byte)0x08, (byte)0x04, (byte)0x02
|
||||
};
|
||||
private static final BigInteger MASK = new BigInteger("7f", 16);
|
||||
|
||||
/**
|
||||
@ -1529,21 +1524,9 @@ abstract class DigestMD5Base extends AbstractSaslImpl {
|
||||
*/
|
||||
private static void setParityBit(byte[] key) {
|
||||
for (int i = 0; i < key.length; i++) {
|
||||
int bitCount = 0;
|
||||
for (int maskIndex = 0;
|
||||
maskIndex < PARITY_BIT_MASK.length; maskIndex++) {
|
||||
if ((key[i] & PARITY_BIT_MASK[maskIndex])
|
||||
== PARITY_BIT_MASK[maskIndex]) {
|
||||
bitCount++;
|
||||
}
|
||||
}
|
||||
if ((bitCount & 0x01) == 1) {
|
||||
// Odd number of 1 bits in the top 7 bits. Set parity bit to 0
|
||||
key[i] = (byte)(key[i] & (byte)0xfe);
|
||||
} else {
|
||||
// Even number of 1 bits in the top 7 bits. Set parity bit to 1
|
||||
key[i] = (byte)(key[i] | 1);
|
||||
}
|
||||
int b = key[i] & 0xfe;
|
||||
b |= (Integer.bitCount(b) & 1) ^ 1;
|
||||
key[i] = (byte) b;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1174,6 +1174,12 @@ public final class System {
|
||||
public void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook) {
|
||||
Shutdown.add(slot, registerShutdownInProgress, hook);
|
||||
}
|
||||
public int getStackTraceDepth(Throwable t) {
|
||||
return t.getStackTraceDepth();
|
||||
}
|
||||
public StackTraceElement getStackTraceElement(Throwable t, int i) {
|
||||
return t.getStackTraceElement(i);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -645,17 +645,21 @@ public class Throwable implements Serializable {
|
||||
/**
|
||||
* Returns the number of elements in the stack trace (or 0 if the stack
|
||||
* trace is unavailable).
|
||||
*
|
||||
* package-protection for use by SharedSecrets.
|
||||
*/
|
||||
private native int getStackTraceDepth();
|
||||
native int getStackTraceDepth();
|
||||
|
||||
/**
|
||||
* Returns the specified element of the stack trace.
|
||||
*
|
||||
* package-protection for use by SharedSecrets.
|
||||
*
|
||||
* @param index index of the element to return.
|
||||
* @throws IndexOutOfBoundsException if <tt>index < 0 ||
|
||||
* index >= getStackTraceDepth() </tt>
|
||||
*/
|
||||
private native StackTraceElement getStackTraceElement(int index);
|
||||
native StackTraceElement getStackTraceElement(int index);
|
||||
|
||||
private synchronized void writeObject(java.io.ObjectOutputStream s)
|
||||
throws IOException
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -110,13 +110,11 @@ class BitSieve {
|
||||
int convertedStep = (step *2) + 1;
|
||||
|
||||
// Construct the large sieve at an even offset specified by base
|
||||
MutableBigInteger r = new MutableBigInteger();
|
||||
MutableBigInteger b = new MutableBigInteger(base);
|
||||
MutableBigInteger q = new MutableBigInteger();
|
||||
do {
|
||||
// Calculate base mod convertedStep
|
||||
r.copyValue(base.mag);
|
||||
r.divideOneWord(convertedStep, q);
|
||||
start = r.value[r.offset];
|
||||
start = b.divideOneWord(convertedStep, q);
|
||||
|
||||
// Take each multiple of step out of sieve
|
||||
start = convertedStep - start;
|
||||
|
@ -126,19 +126,6 @@ public final class MathContext implements Serializable {
|
||||
*/
|
||||
final RoundingMode roundingMode;
|
||||
|
||||
/**
|
||||
* Lookaside for the rounding points (the numbers which determine
|
||||
* whether the coefficient of a number will require rounding).
|
||||
* These will be present if {@code precision > 0} and
|
||||
* {@code precision <= MAX_LOOKASIDE}. In this case they will share the
|
||||
* {@code BigInteger int[]} array. Note that the transients
|
||||
* cannot be {@code final} because they are reconstructed on
|
||||
* deserialization.
|
||||
*/
|
||||
transient BigInteger roundingMax = null;
|
||||
transient BigInteger roundingMin = null;
|
||||
private static final int MAX_LOOKASIDE = 1000;
|
||||
|
||||
/* ----- Constructors ----- */
|
||||
|
||||
/**
|
||||
@ -173,11 +160,6 @@ public final class MathContext implements Serializable {
|
||||
throw new NullPointerException("null RoundingMode");
|
||||
|
||||
precision = setPrecision;
|
||||
if (precision > 0 && precision <= MAX_LOOKASIDE) {
|
||||
roundingMax = BigInteger.TEN.pow(precision);
|
||||
roundingMin = roundingMax.negate();
|
||||
}
|
||||
|
||||
roundingMode = setRoundingMode;
|
||||
return;
|
||||
}
|
||||
@ -221,10 +203,6 @@ public final class MathContext implements Serializable {
|
||||
throw new IllegalArgumentException("Digits < 0");
|
||||
// the other parameters cannot be invalid if we got here
|
||||
precision = setPrecision;
|
||||
if (precision > 0 && precision <= MAX_LOOKASIDE) {
|
||||
roundingMax = BigInteger.TEN.pow(precision);
|
||||
roundingMin = roundingMax.negate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -343,11 +321,6 @@ public final class MathContext implements Serializable {
|
||||
String message = "MathContext: null roundingMode in stream";
|
||||
throw new java.io.StreamCorruptedException(message);
|
||||
}
|
||||
// Set the lookaside, if applicable
|
||||
if (precision <= MAX_LOOKASIDE) {
|
||||
roundingMax = BigInteger.TEN.pow(precision);
|
||||
roundingMin = roundingMax.negate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -41,6 +41,11 @@ package java.math;
|
||||
* @since 1.3
|
||||
*/
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static java.math.BigInteger.LONG_MASK;
|
||||
import static java.math.BigDecimal.INFLATED;
|
||||
|
||||
class MutableBigInteger {
|
||||
/**
|
||||
* Holds the magnitude of this MutableBigInteger in big endian order.
|
||||
@ -62,10 +67,13 @@ class MutableBigInteger {
|
||||
*/
|
||||
int offset = 0;
|
||||
|
||||
// Constants
|
||||
/**
|
||||
* This mask is used to obtain the value of an int as if it were unsigned.
|
||||
* MutableBigInteger with one element value array with the value 1. Used by
|
||||
* BigDecimal divideAndRound to increment the quotient. Use this constant
|
||||
* only when the method is not going to modify this object.
|
||||
*/
|
||||
private final static long LONG_MASK = 0xffffffffL;
|
||||
static final MutableBigInteger ONE = new MutableBigInteger(1);
|
||||
|
||||
// Constructors
|
||||
|
||||
@ -88,15 +96,6 @@ class MutableBigInteger {
|
||||
value[0] = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new MutableBigInteger with the specified value array
|
||||
* up to the specified length.
|
||||
*/
|
||||
MutableBigInteger(int[] val, int len) {
|
||||
value = val;
|
||||
intLen = len;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new MutableBigInteger with the specified value array
|
||||
* up to the length of the array supplied.
|
||||
@ -111,8 +110,8 @@ class MutableBigInteger {
|
||||
* specified BigInteger.
|
||||
*/
|
||||
MutableBigInteger(BigInteger b) {
|
||||
value = b.mag.clone();
|
||||
intLen = value.length;
|
||||
intLen = b.mag.length;
|
||||
value = Arrays.copyOf(b.mag, intLen);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -121,10 +120,58 @@ class MutableBigInteger {
|
||||
*/
|
||||
MutableBigInteger(MutableBigInteger val) {
|
||||
intLen = val.intLen;
|
||||
value = new int[intLen];
|
||||
value = Arrays.copyOfRange(val.value, val.offset, val.offset + intLen);
|
||||
}
|
||||
|
||||
for(int i=0; i<intLen; i++)
|
||||
value[i] = val.value[val.offset+i];
|
||||
/**
|
||||
* Internal helper method to return the magnitude array. The caller is not
|
||||
* supposed to modify the returned array.
|
||||
*/
|
||||
private int[] getMagnitudeArray() {
|
||||
if (offset > 0 || value.length != intLen)
|
||||
return Arrays.copyOfRange(value, offset, offset + intLen);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert this MutableBigInteger to a long value. The caller has to make
|
||||
* sure this MutableBigInteger can be fit into long.
|
||||
*/
|
||||
private long toLong() {
|
||||
assert (intLen <= 2) : "this MutableBigInteger exceeds the range of long";
|
||||
if (intLen == 0)
|
||||
return 0;
|
||||
long d = value[offset] & LONG_MASK;
|
||||
return (intLen == 2) ? d << 32 | (value[offset + 1] & LONG_MASK) : d;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert this MutableBigInteger to a BigInteger object.
|
||||
*/
|
||||
BigInteger toBigInteger(int sign) {
|
||||
if (intLen == 0 || sign == 0)
|
||||
return BigInteger.ZERO;
|
||||
return new BigInteger(getMagnitudeArray(), sign);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert this MutableBigInteger to BigDecimal object with the specified sign
|
||||
* and scale.
|
||||
*/
|
||||
BigDecimal toBigDecimal(int sign, int scale) {
|
||||
if (intLen == 0 || sign == 0)
|
||||
return BigDecimal.valueOf(0, scale);
|
||||
int[] mag = getMagnitudeArray();
|
||||
int len = mag.length;
|
||||
int d = mag[0];
|
||||
// If this MutableBigInteger can't be fit into long, we need to
|
||||
// make a BigInteger object for the resultant BigDecimal object.
|
||||
if (len > 2 || (d < 0 && len == 2))
|
||||
return new BigDecimal(new BigInteger(mag, sign), INFLATED, scale, 0);
|
||||
long v = (len == 2) ?
|
||||
((mag[1] & LONG_MASK) | (d & LONG_MASK) << 32) :
|
||||
d & LONG_MASK;
|
||||
return new BigDecimal(null, sign == -1 ? -v : v, scale, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -146,17 +193,21 @@ class MutableBigInteger {
|
||||
/**
|
||||
* Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1
|
||||
* as this MutableBigInteger is numerically less than, equal to, or
|
||||
* greater than {@code b}.
|
||||
* greater than <tt>b</tt>.
|
||||
*/
|
||||
final int compare(MutableBigInteger b) {
|
||||
if (intLen < b.intLen)
|
||||
int blen = b.intLen;
|
||||
if (intLen < blen)
|
||||
return -1;
|
||||
if (intLen > b.intLen)
|
||||
return 1;
|
||||
if (intLen > blen)
|
||||
return 1;
|
||||
|
||||
for (int i=0; i<intLen; i++) {
|
||||
int b1 = value[offset+i] + 0x80000000;
|
||||
int b2 = b.value[b.offset+i] + 0x80000000;
|
||||
// Add Integer.MIN_VALUE to make the comparison act as unsigned integer
|
||||
// comparison.
|
||||
int[] bval = b.value;
|
||||
for (int i = offset, j = b.offset; i < intLen + offset; i++, j++) {
|
||||
int b1 = value[i] + 0x80000000;
|
||||
int b2 = bval[j] + 0x80000000;
|
||||
if (b1 < b2)
|
||||
return -1;
|
||||
if (b1 > b2)
|
||||
@ -165,6 +216,46 @@ class MutableBigInteger {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare this against half of a MutableBigInteger object (Needed for
|
||||
* remainder tests).
|
||||
* Assumes no leading unnecessary zeros, which holds for results
|
||||
* from divide().
|
||||
*/
|
||||
final int compareHalf(MutableBigInteger b) {
|
||||
int blen = b.intLen;
|
||||
int len = intLen;
|
||||
if (len <= 0)
|
||||
return blen <=0 ? 0 : -1;
|
||||
if (len > blen)
|
||||
return 1;
|
||||
if (len < blen - 1)
|
||||
return -1;
|
||||
int[] bval = b.value;
|
||||
int bstart = 0;
|
||||
int carry = 0;
|
||||
// Only 2 cases left:len == blen or len == blen - 1
|
||||
if (len != blen) { // len == blen - 1
|
||||
if (bval[bstart] == 1) {
|
||||
++bstart;
|
||||
carry = 0x80000000;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
// compare values with right-shifted values of b,
|
||||
// carrying shifted-out bits across words
|
||||
int[] val = value;
|
||||
for (int i = offset, j = bstart; i < len + offset;) {
|
||||
int bv = bval[j++];
|
||||
long hb = ((bv >>> 1) + carry) & LONG_MASK;
|
||||
long v = val[i++] & LONG_MASK;
|
||||
if (v != hb)
|
||||
return v < hb ? -1 : 1;
|
||||
carry = (bv & 1) << 31; // carray will be either 0x80000000 or 0
|
||||
}
|
||||
return carry == 0? 0 : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the index of the lowest set bit in this MutableBigInteger. If the
|
||||
* magnitude of this MutableBigInteger is zero, -1 is returned.
|
||||
@ -178,7 +269,7 @@ class MutableBigInteger {
|
||||
b = value[j+offset];
|
||||
if (b==0)
|
||||
return -1;
|
||||
return ((intLen-1-j)<<5) + BigInteger.trailingZeroCnt(b);
|
||||
return ((intLen-1-j)<<5) + Integer.numberOfTrailingZeros(b);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -270,13 +361,11 @@ class MutableBigInteger {
|
||||
* Sets this MutableBigInteger's value array to a copy of the specified
|
||||
* array. The intLen is set to the length of the new array.
|
||||
*/
|
||||
void copyValue(MutableBigInteger val) {
|
||||
int len = val.intLen;
|
||||
void copyValue(MutableBigInteger src) {
|
||||
int len = src.intLen;
|
||||
if (value.length < len)
|
||||
value = new int[len];
|
||||
|
||||
for(int i=0; i<len; i++)
|
||||
value[i] = val.value[val.offset+i];
|
||||
System.arraycopy(src.value, src.offset, value, 0, len);
|
||||
intLen = len;
|
||||
offset = 0;
|
||||
}
|
||||
@ -289,8 +378,7 @@ class MutableBigInteger {
|
||||
int len = val.length;
|
||||
if (value.length < len)
|
||||
value = new int[len];
|
||||
for(int i=0; i<len; i++)
|
||||
value[i] = val[i];
|
||||
System.arraycopy(val, 0, value, 0, len);
|
||||
intLen = len;
|
||||
offset = 0;
|
||||
}
|
||||
@ -320,7 +408,7 @@ class MutableBigInteger {
|
||||
* Returns true iff this MutableBigInteger is odd.
|
||||
*/
|
||||
boolean isOdd() {
|
||||
return ((value[offset + intLen - 1] & 1) == 1);
|
||||
return isZero() ? false : ((value[offset + intLen - 1] & 1) == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -340,7 +428,7 @@ class MutableBigInteger {
|
||||
* Returns a String representation of this MutableBigInteger in radix 10.
|
||||
*/
|
||||
public String toString() {
|
||||
BigInteger b = new BigInteger(this, 1);
|
||||
BigInteger b = toBigInteger(1);
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
@ -356,7 +444,7 @@ class MutableBigInteger {
|
||||
this.intLen -= nInts;
|
||||
if (nBits == 0)
|
||||
return;
|
||||
int bitsInHighWord = BigInteger.bitLen(value[offset]);
|
||||
int bitsInHighWord = BigInteger.bitLengthForInt(value[offset]);
|
||||
if (nBits >= bitsInHighWord) {
|
||||
this.primitiveLeftShift(32 - nBits);
|
||||
this.intLen--;
|
||||
@ -379,7 +467,7 @@ class MutableBigInteger {
|
||||
return;
|
||||
int nInts = n >>> 5;
|
||||
int nBits = n&0x1F;
|
||||
int bitsInHighWord = BigInteger.bitLen(value[offset]);
|
||||
int bitsInHighWord = BigInteger.bitLengthForInt(value[offset]);
|
||||
|
||||
// If shift can be done without moving words, do so
|
||||
if (n <= (32-bitsInHighWord)) {
|
||||
@ -499,34 +587,41 @@ class MutableBigInteger {
|
||||
int[] result = (value.length < resultLen ? new int[resultLen] : value);
|
||||
|
||||
int rstart = result.length-1;
|
||||
long sum = 0;
|
||||
long sum;
|
||||
long carry = 0;
|
||||
|
||||
// Add common parts of both numbers
|
||||
while(x>0 && y>0) {
|
||||
x--; y--;
|
||||
sum = (value[x+offset] & LONG_MASK) +
|
||||
(addend.value[y+addend.offset] & LONG_MASK) + (sum >>> 32);
|
||||
(addend.value[y+addend.offset] & LONG_MASK) + carry;
|
||||
result[rstart--] = (int)sum;
|
||||
carry = sum >>> 32;
|
||||
}
|
||||
|
||||
// Add remainder of the longer number
|
||||
while(x>0) {
|
||||
x--;
|
||||
sum = (value[x+offset] & LONG_MASK) + (sum >>> 32);
|
||||
if (carry == 0 && result == value && rstart == (x + offset))
|
||||
return;
|
||||
sum = (value[x+offset] & LONG_MASK) + carry;
|
||||
result[rstart--] = (int)sum;
|
||||
carry = sum >>> 32;
|
||||
}
|
||||
while(y>0) {
|
||||
y--;
|
||||
sum = (addend.value[y+addend.offset] & LONG_MASK) + (sum >>> 32);
|
||||
sum = (addend.value[y+addend.offset] & LONG_MASK) + carry;
|
||||
result[rstart--] = (int)sum;
|
||||
carry = sum >>> 32;
|
||||
}
|
||||
|
||||
if ((sum >>> 32) > 0) { // Result must grow in length
|
||||
if (carry > 0) { // Result must grow in length
|
||||
resultLen++;
|
||||
if (result.length < resultLen) {
|
||||
int temp[] = new int[resultLen];
|
||||
for (int i=resultLen-1; i>0; i--)
|
||||
temp[i] = result[i-1];
|
||||
// Result one word longer from carry-out; copy low-order
|
||||
// bits into new result.
|
||||
System.arraycopy(result, 0, temp, 1, result.length);
|
||||
temp[0] = 1;
|
||||
result = temp;
|
||||
} else {
|
||||
@ -708,29 +803,26 @@ class MutableBigInteger {
|
||||
z.value = zval;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* This method is used for division of an n word dividend by a one word
|
||||
* divisor. The quotient is placed into quotient. The one word divisor is
|
||||
* specified by divisor. The value of this MutableBigInteger is the
|
||||
* dividend at invocation but is replaced by the remainder.
|
||||
* specified by divisor.
|
||||
*
|
||||
* @return the remainder of the division is returned.
|
||||
*
|
||||
* NOTE: The value of this MutableBigInteger is modified by this method.
|
||||
*/
|
||||
void divideOneWord(int divisor, MutableBigInteger quotient) {
|
||||
long divLong = divisor & LONG_MASK;
|
||||
int divideOneWord(int divisor, MutableBigInteger quotient) {
|
||||
long divisorLong = divisor & LONG_MASK;
|
||||
|
||||
// Special case of one word dividend
|
||||
if (intLen == 1) {
|
||||
long remValue = value[offset] & LONG_MASK;
|
||||
quotient.value[0] = (int) (remValue / divLong);
|
||||
quotient.intLen = (quotient.value[0] == 0) ? 0 : 1;
|
||||
long dividendValue = value[offset] & LONG_MASK;
|
||||
int q = (int) (dividendValue / divisorLong);
|
||||
int r = (int) (dividendValue - q * divisorLong);
|
||||
quotient.value[0] = q;
|
||||
quotient.intLen = (q == 0) ? 0 : 1;
|
||||
quotient.offset = 0;
|
||||
|
||||
value[0] = (int) (remValue - (quotient.value[0] * divLong));
|
||||
offset = 0;
|
||||
intLen = (value[0] == 0) ? 0 : 1;
|
||||
|
||||
return;
|
||||
return r;
|
||||
}
|
||||
|
||||
if (quotient.value.length < intLen)
|
||||
@ -739,15 +831,15 @@ class MutableBigInteger {
|
||||
quotient.intLen = intLen;
|
||||
|
||||
// Normalize the divisor
|
||||
int shift = 32 - BigInteger.bitLen(divisor);
|
||||
int shift = Integer.numberOfLeadingZeros(divisor);
|
||||
|
||||
int rem = value[offset];
|
||||
long remLong = rem & LONG_MASK;
|
||||
if (remLong < divLong) {
|
||||
if (remLong < divisorLong) {
|
||||
quotient.value[0] = 0;
|
||||
} else {
|
||||
quotient.value[0] = (int)(remLong/divLong);
|
||||
rem = (int) (remLong - (quotient.value[0] * divLong));
|
||||
quotient.value[0] = (int)(remLong / divisorLong);
|
||||
rem = (int) (remLong - (quotient.value[0] * divisorLong));
|
||||
remLong = rem & LONG_MASK;
|
||||
}
|
||||
|
||||
@ -757,8 +849,8 @@ class MutableBigInteger {
|
||||
long dividendEstimate = (remLong<<32) |
|
||||
(value[offset + intLen - xlen] & LONG_MASK);
|
||||
if (dividendEstimate >= 0) {
|
||||
qWord[0] = (int) (dividendEstimate/divLong);
|
||||
qWord[1] = (int) (dividendEstimate - (qWord[0] * divLong));
|
||||
qWord[0] = (int) (dividendEstimate / divisorLong);
|
||||
qWord[1] = (int) (dividendEstimate - qWord[0] * divisorLong);
|
||||
} else {
|
||||
divWord(qWord, dividendEstimate, divisor);
|
||||
}
|
||||
@ -767,81 +859,110 @@ class MutableBigInteger {
|
||||
remLong = rem & LONG_MASK;
|
||||
}
|
||||
|
||||
quotient.normalize();
|
||||
// Unnormalize
|
||||
if (shift > 0)
|
||||
value[0] = rem %= divisor;
|
||||
return rem % divisor;
|
||||
else
|
||||
value[0] = rem;
|
||||
intLen = (value[0] == 0) ? 0 : 1;
|
||||
|
||||
quotient.normalize();
|
||||
return rem;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the quotient and remainder of this div b and places them
|
||||
* in the MutableBigInteger objects provided.
|
||||
* Calculates the quotient of this div b and places the quotient in the
|
||||
* provided MutableBigInteger objects and the remainder object is returned.
|
||||
*
|
||||
* Uses Algorithm D in Knuth section 4.3.1.
|
||||
* Many optimizations to that algorithm have been adapted from the Colin
|
||||
* Plumb C library.
|
||||
* It special cases one word divisors for speed.
|
||||
* The contents of a and b are not changed.
|
||||
* It special cases one word divisors for speed. The content of b is not
|
||||
* changed.
|
||||
*
|
||||
*/
|
||||
void divide(MutableBigInteger b,
|
||||
MutableBigInteger quotient, MutableBigInteger rem) {
|
||||
MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient) {
|
||||
if (b.intLen == 0)
|
||||
throw new ArithmeticException("BigInteger divide by zero");
|
||||
|
||||
// Dividend is zero
|
||||
if (intLen == 0) {
|
||||
quotient.intLen = quotient.offset = rem.intLen = rem.offset = 0;
|
||||
return;
|
||||
quotient.intLen = quotient.offset;
|
||||
return new MutableBigInteger();
|
||||
}
|
||||
|
||||
int cmp = compare(b);
|
||||
|
||||
// Dividend less than divisor
|
||||
if (cmp < 0) {
|
||||
quotient.intLen = quotient.offset = 0;
|
||||
rem.copyValue(this);
|
||||
return;
|
||||
return new MutableBigInteger(this);
|
||||
}
|
||||
// Dividend equal to divisor
|
||||
if (cmp == 0) {
|
||||
quotient.value[0] = quotient.intLen = 1;
|
||||
quotient.offset = rem.intLen = rem.offset = 0;
|
||||
return;
|
||||
quotient.offset = 0;
|
||||
return new MutableBigInteger();
|
||||
}
|
||||
|
||||
quotient.clear();
|
||||
|
||||
// Special case one word divisor
|
||||
if (b.intLen == 1) {
|
||||
rem.copyValue(this);
|
||||
rem.divideOneWord(b.value[b.offset], quotient);
|
||||
return;
|
||||
int r = divideOneWord(b.value[b.offset], quotient);
|
||||
if (r == 0)
|
||||
return new MutableBigInteger();
|
||||
return new MutableBigInteger(r);
|
||||
}
|
||||
|
||||
// Copy divisor value to protect divisor
|
||||
int[] d = new int[b.intLen];
|
||||
for(int i=0; i<b.intLen; i++)
|
||||
d[i] = b.value[b.offset+i];
|
||||
int dlen = b.intLen;
|
||||
int[] div = Arrays.copyOfRange(b.value, b.offset, b.offset + b.intLen);
|
||||
return divideMagnitude(div, quotient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internally used to calculate the quotient of this div v and places the
|
||||
* quotient in the provided MutableBigInteger object and the remainder is
|
||||
* returned.
|
||||
*
|
||||
* @return the remainder of the division will be returned.
|
||||
*/
|
||||
long divide(long v, MutableBigInteger quotient) {
|
||||
if (v == 0)
|
||||
throw new ArithmeticException("BigInteger divide by zero");
|
||||
|
||||
// Dividend is zero
|
||||
if (intLen == 0) {
|
||||
quotient.intLen = quotient.offset = 0;
|
||||
return 0;
|
||||
}
|
||||
if (v < 0)
|
||||
v = -v;
|
||||
|
||||
int d = (int)(v >>> 32);
|
||||
quotient.clear();
|
||||
// Special case on word divisor
|
||||
if (d == 0)
|
||||
return divideOneWord((int)v, quotient) & LONG_MASK;
|
||||
else {
|
||||
int[] div = new int[]{ d, (int)(v & LONG_MASK) };
|
||||
return divideMagnitude(div, quotient).toLong();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Divide this MutableBigInteger by the divisor represented by its magnitude
|
||||
* array. The quotient will be placed into the provided quotient object &
|
||||
* the remainder object is returned.
|
||||
*/
|
||||
private MutableBigInteger divideMagnitude(int[] divisor,
|
||||
MutableBigInteger quotient) {
|
||||
|
||||
// Remainder starts as dividend with space for a leading zero
|
||||
if (rem.value.length < intLen +1)
|
||||
rem.value = new int[intLen+1];
|
||||
|
||||
for (int i=0; i<intLen; i++)
|
||||
rem.value[i+1] = value[i+offset];
|
||||
MutableBigInteger rem = new MutableBigInteger(new int[intLen + 1]);
|
||||
System.arraycopy(value, offset, rem.value, 1, intLen);
|
||||
rem.intLen = intLen;
|
||||
rem.offset = 1;
|
||||
|
||||
int nlen = rem.intLen;
|
||||
|
||||
// Set the quotient size
|
||||
int dlen = divisor.length;
|
||||
int limit = nlen - dlen + 1;
|
||||
if (quotient.value.length < limit) {
|
||||
quotient.value = new int[limit];
|
||||
@ -851,10 +972,10 @@ class MutableBigInteger {
|
||||
int[] q = quotient.value;
|
||||
|
||||
// D1 normalize the divisor
|
||||
int shift = 32 - BigInteger.bitLen(d[0]);
|
||||
int shift = Integer.numberOfLeadingZeros(divisor[0]);
|
||||
if (shift > 0) {
|
||||
// First shift will not grow array
|
||||
BigInteger.primitiveLeftShift(d, dlen, shift);
|
||||
BigInteger.primitiveLeftShift(divisor, dlen, shift);
|
||||
// But this one might
|
||||
rem.leftShift(shift);
|
||||
}
|
||||
@ -866,9 +987,9 @@ class MutableBigInteger {
|
||||
rem.intLen++;
|
||||
}
|
||||
|
||||
int dh = d[0];
|
||||
int dh = divisor[0];
|
||||
long dhLong = dh & LONG_MASK;
|
||||
int dl = d[1];
|
||||
int dl = divisor[1];
|
||||
int[] qWord = new int[2];
|
||||
|
||||
// D2 Initialize j
|
||||
@ -910,7 +1031,7 @@ class MutableBigInteger {
|
||||
qhat--;
|
||||
qrem = (int)((qrem & LONG_MASK) + dhLong);
|
||||
if ((qrem & LONG_MASK) >= dhLong) {
|
||||
estProduct = (dl & LONG_MASK) * (qhat & LONG_MASK);
|
||||
estProduct -= (dl & LONG_MASK);
|
||||
rs = ((qrem & LONG_MASK) << 32) | nl;
|
||||
if (unsignedLongCompare(estProduct, rs))
|
||||
qhat--;
|
||||
@ -920,12 +1041,12 @@ class MutableBigInteger {
|
||||
|
||||
// D4 Multiply and subtract
|
||||
rem.value[j+rem.offset] = 0;
|
||||
int borrow = mulsub(rem.value, d, qhat, dlen, j+rem.offset);
|
||||
int borrow = mulsub(rem.value, divisor, qhat, dlen, j+rem.offset);
|
||||
|
||||
// D5 Test remainder
|
||||
if (borrow + 0x80000000 > nh2) {
|
||||
// D6 Add back
|
||||
divadd(d, rem.value, j+1+rem.offset);
|
||||
divadd(divisor, rem.value, j+1+rem.offset);
|
||||
qhat--;
|
||||
}
|
||||
|
||||
@ -937,8 +1058,9 @@ class MutableBigInteger {
|
||||
if (shift > 0)
|
||||
rem.rightShift(shift);
|
||||
|
||||
rem.normalize();
|
||||
quotient.normalize();
|
||||
rem.normalize();
|
||||
return rem;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -989,16 +1111,15 @@ class MutableBigInteger {
|
||||
// Use Euclid's algorithm until the numbers are approximately the
|
||||
// same length, then use the binary GCD algorithm to find the GCD.
|
||||
MutableBigInteger a = this;
|
||||
MutableBigInteger q = new MutableBigInteger(),
|
||||
r = new MutableBigInteger();
|
||||
MutableBigInteger q = new MutableBigInteger();
|
||||
|
||||
while (b.intLen != 0) {
|
||||
if (Math.abs(a.intLen - b.intLen) < 2)
|
||||
return a.binaryGCD(b);
|
||||
|
||||
a.divide(b, q, r);
|
||||
MutableBigInteger swapper = a;
|
||||
a = b; b = r; r = swapper;
|
||||
MutableBigInteger r = a.divide(b, q);
|
||||
a = b;
|
||||
b = r;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
@ -1069,40 +1190,21 @@ class MutableBigInteger {
|
||||
if (a==0)
|
||||
return b;
|
||||
|
||||
int x;
|
||||
int aZeros = 0;
|
||||
while ((x = a & 0xff) == 0) {
|
||||
a >>>= 8;
|
||||
aZeros += 8;
|
||||
}
|
||||
int y = BigInteger.trailingZeroTable[x];
|
||||
aZeros += y;
|
||||
a >>>= y;
|
||||
|
||||
int bZeros = 0;
|
||||
while ((x = b & 0xff) == 0) {
|
||||
b >>>= 8;
|
||||
bZeros += 8;
|
||||
}
|
||||
y = BigInteger.trailingZeroTable[x];
|
||||
bZeros += y;
|
||||
b >>>= y;
|
||||
// Right shift a & b till their last bits equal to 1.
|
||||
int aZeros = Integer.numberOfTrailingZeros(a);
|
||||
int bZeros = Integer.numberOfTrailingZeros(b);
|
||||
a >>>= aZeros;
|
||||
b >>>= bZeros;
|
||||
|
||||
int t = (aZeros < bZeros ? aZeros : bZeros);
|
||||
|
||||
while (a != b) {
|
||||
if ((a+0x80000000) > (b+0x80000000)) { // a > b as unsigned
|
||||
a -= b;
|
||||
|
||||
while ((x = a & 0xff) == 0)
|
||||
a >>>= 8;
|
||||
a >>>= BigInteger.trailingZeroTable[x];
|
||||
a >>>= Integer.numberOfTrailingZeros(a);
|
||||
} else {
|
||||
b -= a;
|
||||
|
||||
while ((x = b & 0xff) == 0)
|
||||
b >>>= 8;
|
||||
b >>>= BigInteger.trailingZeroTable[x];
|
||||
b >>>= Integer.numberOfTrailingZeros(b);
|
||||
}
|
||||
}
|
||||
return a<<t;
|
||||
@ -1152,8 +1254,7 @@ class MutableBigInteger {
|
||||
temp1.multiply(y2, temp2);
|
||||
|
||||
result.add(temp2);
|
||||
result.divide(p, temp1, temp2);
|
||||
return temp2;
|
||||
return result.divide(p, temp1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1321,40 +1422,45 @@ class MutableBigInteger {
|
||||
|
||||
MutableBigInteger a = new MutableBigInteger(this);
|
||||
MutableBigInteger q = new MutableBigInteger();
|
||||
MutableBigInteger r = new MutableBigInteger();
|
||||
MutableBigInteger r = b.divide(a, q);
|
||||
|
||||
b.divide(a, q, r);
|
||||
MutableBigInteger swapper = b; b = r; r = swapper;
|
||||
MutableBigInteger swapper = b;
|
||||
// swap b & r
|
||||
b = r;
|
||||
r = swapper;
|
||||
|
||||
MutableBigInteger t1 = new MutableBigInteger(q);
|
||||
MutableBigInteger t0 = new MutableBigInteger(1);
|
||||
MutableBigInteger temp = new MutableBigInteger();
|
||||
|
||||
while (!b.isOne()) {
|
||||
a.divide(b, q, r);
|
||||
r = a.divide(b, q);
|
||||
|
||||
if (r.intLen == 0)
|
||||
throw new ArithmeticException("BigInteger not invertible.");
|
||||
|
||||
swapper = r; r = a; a = swapper;
|
||||
swapper = r;
|
||||
a = swapper;
|
||||
|
||||
if (q.intLen == 1)
|
||||
t1.mul(q.value[q.offset], temp);
|
||||
else
|
||||
q.multiply(t1, temp);
|
||||
swapper = q; q = temp; temp = swapper;
|
||||
|
||||
swapper = q;
|
||||
q = temp;
|
||||
temp = swapper;
|
||||
t0.add(q);
|
||||
|
||||
if (a.isOne())
|
||||
return t0;
|
||||
|
||||
b.divide(a, q, r);
|
||||
r = b.divide(a, q);
|
||||
|
||||
if (r.intLen == 0)
|
||||
throw new ArithmeticException("BigInteger not invertible.");
|
||||
|
||||
swapper = b; b = r; r = swapper;
|
||||
swapper = b;
|
||||
b = r;
|
||||
|
||||
if (q.intLen == 1)
|
||||
t0.mul(q.value[q.offset], temp);
|
||||
|
@ -129,9 +129,7 @@ class SignedMutableBigInteger extends MutableBigInteger {
|
||||
* array starting at offset.
|
||||
*/
|
||||
public String toString() {
|
||||
BigInteger b = new BigInteger(this, sign);
|
||||
return
|
||||
b.toString();
|
||||
return this.toBigInteger(sign).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -286,6 +286,14 @@ public class CookieManager extends CookieHandler
|
||||
}
|
||||
cookie.setPath(path);
|
||||
}
|
||||
|
||||
// As per RFC 2965, section 3.3.1:
|
||||
// Domain Defaults to the effective request-host. (Note that because
|
||||
// there is no dot at the beginning of effective request-host,
|
||||
// the default Domain can only domain-match itself.)
|
||||
if (cookie.getDomain() == null) {
|
||||
cookie.setDomain(uri.getHost());
|
||||
}
|
||||
String ports = cookie.getPortlist();
|
||||
if (ports != null) {
|
||||
int port = uri.getPort();
|
||||
|
@ -1237,7 +1237,6 @@ public abstract class URLConnection {
|
||||
}
|
||||
|
||||
private static Hashtable handlers = new Hashtable();
|
||||
private static final ContentHandler UnknownContentHandlerP = new UnknownContentHandler();
|
||||
|
||||
/**
|
||||
* Gets the Content Handler appropriate for this connection.
|
||||
@ -1264,7 +1263,7 @@ public abstract class URLConnection {
|
||||
handler = lookupContentHandlerClassFor(contentType);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
handler = UnknownContentHandlerP;
|
||||
handler = UnknownContentHandler.INSTANCE;
|
||||
}
|
||||
handlers.put(contentType, handler);
|
||||
}
|
||||
@ -1335,7 +1334,7 @@ public abstract class URLConnection {
|
||||
}
|
||||
}
|
||||
|
||||
return UnknownContentHandlerP;
|
||||
return UnknownContentHandler.INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1761,6 +1760,8 @@ public abstract class URLConnection {
|
||||
|
||||
|
||||
class UnknownContentHandler extends ContentHandler {
|
||||
static final ContentHandler INSTANCE = new UnknownContentHandler();
|
||||
|
||||
public Object getContent(URLConnection uc) throws IOException {
|
||||
return uc.getInputStream();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-2009 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
|
||||
@ -35,10 +35,7 @@
|
||||
|
||||
package java.text;
|
||||
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.font.TextAttribute;
|
||||
import java.awt.font.NumericShaper;
|
||||
import sun.text.CodePointIterator;
|
||||
import sun.text.bidi.BidiBase;
|
||||
|
||||
/**
|
||||
* This class implements the Unicode Bidirectional Algorithm.
|
||||
@ -62,15 +59,6 @@ import sun.text.CodePointIterator;
|
||||
* @since 1.4
|
||||
*/
|
||||
public final class Bidi {
|
||||
byte dir;
|
||||
byte baselevel;
|
||||
int length;
|
||||
int[] runs;
|
||||
int[] cws;
|
||||
|
||||
static {
|
||||
sun.font.FontManagerNativeLibrary.load();
|
||||
}
|
||||
|
||||
/** Constant indicating base direction is left-to-right. */
|
||||
public static final int DIRECTION_LEFT_TO_RIGHT = 0;
|
||||
@ -94,7 +82,7 @@ public final class Bidi {
|
||||
*/
|
||||
public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1;
|
||||
|
||||
private static final int DIR_MIXED = 2;
|
||||
private BidiBase bidiBase;
|
||||
|
||||
/**
|
||||
* Create Bidi from the given paragraph of text and base direction.
|
||||
@ -109,7 +97,7 @@ public final class Bidi {
|
||||
throw new IllegalArgumentException("paragraph is null");
|
||||
}
|
||||
|
||||
nativeBidiChars(this, paragraph.toCharArray(), 0, null, 0, paragraph.length(), flags);
|
||||
bidiBase = new BidiBase(paragraph.toCharArray(), 0, null, 0, paragraph.length(), flags);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -142,67 +130,8 @@ public final class Bidi {
|
||||
throw new IllegalArgumentException("paragraph is null");
|
||||
}
|
||||
|
||||
int flags = DIRECTION_DEFAULT_LEFT_TO_RIGHT;
|
||||
byte[] embeddings = null;
|
||||
|
||||
int start = paragraph.getBeginIndex();
|
||||
int limit = paragraph.getEndIndex();
|
||||
int length = limit - start;
|
||||
int n = 0;
|
||||
char[] text = new char[length];
|
||||
for (char c = paragraph.first(); c != paragraph.DONE; c = paragraph.next()) {
|
||||
text[n++] = c;
|
||||
}
|
||||
|
||||
paragraph.first();
|
||||
try {
|
||||
Boolean runDirection = (Boolean)paragraph.getAttribute(TextAttribute.RUN_DIRECTION);
|
||||
if (runDirection != null) {
|
||||
if (TextAttribute.RUN_DIRECTION_LTR.equals(runDirection)) {
|
||||
flags = DIRECTION_LEFT_TO_RIGHT; // clears default setting
|
||||
} else {
|
||||
flags = DIRECTION_RIGHT_TO_LEFT;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ClassCastException e) {
|
||||
}
|
||||
|
||||
try {
|
||||
NumericShaper shaper = (NumericShaper)paragraph.getAttribute(TextAttribute.NUMERIC_SHAPING);
|
||||
if (shaper != null) {
|
||||
shaper.shape(text, 0, text.length);
|
||||
}
|
||||
}
|
||||
catch (ClassCastException e) {
|
||||
}
|
||||
|
||||
int pos = start;
|
||||
do {
|
||||
paragraph.setIndex(pos);
|
||||
Object embeddingLevel = paragraph.getAttribute(TextAttribute.BIDI_EMBEDDING);
|
||||
int newpos = paragraph.getRunLimit(TextAttribute.BIDI_EMBEDDING);
|
||||
|
||||
if (embeddingLevel != null) {
|
||||
try {
|
||||
int intLevel = ((Integer)embeddingLevel).intValue();
|
||||
if (intLevel >= -61 && intLevel < 61) {
|
||||
byte level = (byte)(intLevel < 0 ? (-intLevel | 0x80) : intLevel);
|
||||
if (embeddings == null) {
|
||||
embeddings = new byte[length];
|
||||
}
|
||||
for (int i = pos - start; i < newpos - start; ++i) {
|
||||
embeddings[i] = level;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ClassCastException e) {
|
||||
}
|
||||
}
|
||||
pos = newpos;
|
||||
} while (pos < limit);
|
||||
|
||||
nativeBidiChars(this, text, 0, embeddings, 0, text.length, flags);
|
||||
bidiBase = new BidiBase(0, 0);
|
||||
bidiBase.setPara(paragraph);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -240,46 +169,7 @@ public final class Bidi {
|
||||
" for embeddings of length: " + text.length);
|
||||
}
|
||||
|
||||
if (embeddings != null) {
|
||||
// native uses high bit to indicate override, not negative value, sigh
|
||||
|
||||
for (int i = embStart, embLimit = embStart + paragraphLength; i < embLimit; ++i) {
|
||||
if (embeddings[i] < 0) {
|
||||
byte[] temp = new byte[paragraphLength];
|
||||
System.arraycopy(embeddings, embStart, temp, 0, paragraphLength);
|
||||
|
||||
for (i -= embStart; i < paragraphLength; ++i) {
|
||||
if (temp[i] < 0) {
|
||||
temp[i] = (byte)(-temp[i] | 0x80);
|
||||
}
|
||||
}
|
||||
|
||||
embeddings = temp;
|
||||
embStart = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nativeBidiChars(this, text, textStart, embeddings, embStart, paragraphLength, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Private constructor used by line bidi.
|
||||
*/
|
||||
private Bidi(int dir, int baseLevel, int length, int[] data, int[] cws) {
|
||||
reset(dir, baseLevel, length, data, cws);
|
||||
}
|
||||
|
||||
/**
|
||||
* Private mutator used by native code.
|
||||
*/
|
||||
private void reset(int dir, int baselevel, int length, int[] data, int[] cws) {
|
||||
this.dir = (byte)dir;
|
||||
this.baselevel = (byte)baselevel;
|
||||
this.length = length;
|
||||
this.runs = data;
|
||||
this.cws = cws;
|
||||
bidiBase = new BidiBase(text, textStart, embeddings, embStart, paragraphLength, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -290,96 +180,10 @@ public final class Bidi {
|
||||
* @param lineLimit the offset from the start of the paragraph to the limit of the line.
|
||||
*/
|
||||
public Bidi createLineBidi(int lineStart, int lineLimit) {
|
||||
if (lineStart == 0 && lineLimit == length) {
|
||||
return this;
|
||||
}
|
||||
AttributedString astr = new AttributedString("");
|
||||
Bidi newBidi = new Bidi(astr.getIterator());
|
||||
|
||||
int lineLength = lineLimit - lineStart;
|
||||
if (lineStart < 0 ||
|
||||
lineLimit < lineStart ||
|
||||
lineLimit > length) {
|
||||
throw new IllegalArgumentException("range " + lineStart +
|
||||
" to " + lineLimit +
|
||||
" is invalid for paragraph of length " + length);
|
||||
}
|
||||
|
||||
if (runs == null) {
|
||||
return new Bidi(dir, baselevel, lineLength, null, null);
|
||||
} else {
|
||||
int cwspos = -1;
|
||||
int[] ncws = null;
|
||||
if (cws != null) {
|
||||
int cwss = 0;
|
||||
int cwsl = cws.length;
|
||||
while (cwss < cwsl) {
|
||||
if (cws[cwss] >= lineStart) {
|
||||
cwsl = cwss;
|
||||
while (cwsl < cws.length && cws[cwsl] < lineLimit) {
|
||||
cwsl++;
|
||||
}
|
||||
int ll = lineLimit-1;
|
||||
while (cwsl > cwss && cws[cwsl-1] == ll) {
|
||||
cwspos = ll; // record start of counter-directional whitespace
|
||||
--cwsl;
|
||||
--ll;
|
||||
}
|
||||
|
||||
if (cwspos == lineStart) { // entire line is cws, so ignore
|
||||
return new Bidi(dir, baselevel, lineLength, null, null);
|
||||
}
|
||||
|
||||
int ncwslen = cwsl - cwss;
|
||||
if (ncwslen > 0) {
|
||||
ncws = new int[ncwslen];
|
||||
for (int i = 0; i < ncwslen; ++i) {
|
||||
ncws[i] = cws[cwss+i] - lineStart;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
++cwss;
|
||||
}
|
||||
}
|
||||
|
||||
int[] nruns = null;
|
||||
int nlevel = baselevel;
|
||||
int limit = cwspos == -1 ? lineLimit : cwspos;
|
||||
int rs = 0;
|
||||
int rl = runs.length;
|
||||
int ndir = dir;
|
||||
for (; rs < runs.length; rs += 2) {
|
||||
if (runs[rs] > lineStart) {
|
||||
rl = rs;
|
||||
while (rl < runs.length && runs[rl] < limit) {
|
||||
rl += 2;
|
||||
}
|
||||
if ((rl > rs) || (runs[rs+1] != baselevel)) {
|
||||
rl += 2;
|
||||
|
||||
if (cwspos != -1 && rl > rs && runs[rl-1] != baselevel) { // add level for cws
|
||||
nruns = new int[rl - rs + 2];
|
||||
nruns[rl - rs] = lineLength;
|
||||
nruns[rl - rs + 1] = baselevel;
|
||||
} else {
|
||||
limit = lineLimit;
|
||||
nruns = new int[rl - rs];
|
||||
}
|
||||
|
||||
int n = 0;
|
||||
for (int i = rs; i < rl; i += 2) {
|
||||
nruns[n++] = runs[i] - lineStart;
|
||||
nruns[n++] = runs[i+1];
|
||||
}
|
||||
nruns[n-2] = limit - lineStart;
|
||||
} else {
|
||||
ndir = (runs[rs+1] & 0x1) == 0 ? DIRECTION_LEFT_TO_RIGHT : DIRECTION_RIGHT_TO_LEFT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return new Bidi(ndir, baselevel, lineLength, nruns, ncws);
|
||||
}
|
||||
return bidiBase.setLine(this, bidiBase, newBidi, newBidi.bidiBase,lineStart, lineLimit);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -388,7 +192,7 @@ public final class Bidi {
|
||||
* @return true if the line is not left-to-right or right-to-left.
|
||||
*/
|
||||
public boolean isMixed() {
|
||||
return dir == DIR_MIXED;
|
||||
return bidiBase.isMixed();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -396,7 +200,7 @@ public final class Bidi {
|
||||
* @return true if the line is all left-to-right text and the base direction is left-to-right
|
||||
*/
|
||||
public boolean isLeftToRight() {
|
||||
return dir == DIRECTION_LEFT_TO_RIGHT;
|
||||
return bidiBase.isLeftToRight();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -404,7 +208,7 @@ public final class Bidi {
|
||||
* @return true if the line is all right-to-left text, and the base direction is right-to-left
|
||||
*/
|
||||
public boolean isRightToLeft() {
|
||||
return dir == DIRECTION_RIGHT_TO_LEFT;
|
||||
return bidiBase.isRightToLeft();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -412,7 +216,7 @@ public final class Bidi {
|
||||
* @return the length of text in the line
|
||||
*/
|
||||
public int getLength() {
|
||||
return length;
|
||||
return bidiBase.getLength();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -420,7 +224,7 @@ public final class Bidi {
|
||||
* @return true if the base direction is left-to-right
|
||||
*/
|
||||
public boolean baseIsLeftToRight() {
|
||||
return (baselevel & 0x1) == 0;
|
||||
return bidiBase.baseIsLeftToRight();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -428,7 +232,7 @@ public final class Bidi {
|
||||
* @return the base level
|
||||
*/
|
||||
public int getBaseLevel() {
|
||||
return baselevel;
|
||||
return bidiBase.getParaLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -438,17 +242,7 @@ public final class Bidi {
|
||||
* @return the resolved level of the character at offset
|
||||
*/
|
||||
public int getLevelAt(int offset) {
|
||||
if (runs == null || offset < 0 || offset >= length) {
|
||||
return baselevel;
|
||||
} else {
|
||||
int i = 0;
|
||||
do {
|
||||
if (offset < runs[i]) {
|
||||
return runs[i+1];
|
||||
}
|
||||
i += 2;
|
||||
} while (true);
|
||||
}
|
||||
return bidiBase.getLevelAt(offset);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -456,7 +250,7 @@ public final class Bidi {
|
||||
* @return the number of level runs
|
||||
*/
|
||||
public int getRunCount() {
|
||||
return runs == null ? 1 : runs.length / 2;
|
||||
return bidiBase.countRuns();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -465,7 +259,7 @@ public final class Bidi {
|
||||
* @return the level of the run
|
||||
*/
|
||||
public int getRunLevel(int run) {
|
||||
return runs == null ? baselevel : runs[run * 2 + 1];
|
||||
return bidiBase.getRunLevel(run);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -475,7 +269,7 @@ public final class Bidi {
|
||||
* @return the start of the run
|
||||
*/
|
||||
public int getRunStart(int run) {
|
||||
return (runs == null || run == 0) ? 0 : runs[run * 2 - 2];
|
||||
return bidiBase.getRunStart(run);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -486,7 +280,7 @@ public final class Bidi {
|
||||
* @return limit the limit of the run
|
||||
*/
|
||||
public int getRunLimit(int run) {
|
||||
return runs == null ? length : runs[run * 2];
|
||||
return bidiBase.getRunLimit(run);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -501,16 +295,7 @@ public final class Bidi {
|
||||
* @return true if the range of characters requires bidi analysis
|
||||
*/
|
||||
public static boolean requiresBidi(char[] text, int start, int limit) {
|
||||
CodePointIterator cpi = CodePointIterator.create(text, start, limit);
|
||||
for (int cp = cpi.next(); cp != CodePointIterator.DONE; cp = cpi.next()) {
|
||||
if (cp > 0x0590) {
|
||||
int dc = nativeGetDirectionCode(cp);
|
||||
if ((RMASK & (1 << dc)) != 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return BidiBase.requiresBidi(text, start, limit);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -530,124 +315,14 @@ public final class Bidi {
|
||||
* @param count the number of objects to reorder
|
||||
*/
|
||||
public static void reorderVisually(byte[] levels, int levelStart, Object[] objects, int objectStart, int count) {
|
||||
|
||||
if (count < 0) {
|
||||
throw new IllegalArgumentException("count " + count + " must be >= 0");
|
||||
}
|
||||
if (levelStart < 0 || levelStart + count > levels.length) {
|
||||
throw new IllegalArgumentException("levelStart " + levelStart + " and count " + count +
|
||||
" out of range [0, " + levels.length + "]");
|
||||
}
|
||||
if (objectStart < 0 || objectStart + count > objects.length) {
|
||||
throw new IllegalArgumentException("objectStart " + objectStart + " and count " + count +
|
||||
" out of range [0, " + objects.length + "]");
|
||||
}
|
||||
|
||||
byte lowestOddLevel = (byte)(NUMLEVELS + 1);
|
||||
byte highestLevel = 0;
|
||||
|
||||
// initialize mapping and levels
|
||||
|
||||
int levelLimit = levelStart + count;
|
||||
for (int i = levelStart; i < levelLimit; i++) {
|
||||
byte level = levels[i];
|
||||
if (level > highestLevel) {
|
||||
highestLevel = level;
|
||||
}
|
||||
|
||||
if ((level & 0x01) != 0 && level < lowestOddLevel) {
|
||||
lowestOddLevel = level;
|
||||
}
|
||||
}
|
||||
|
||||
int delta = objectStart - levelStart;
|
||||
|
||||
while (highestLevel >= lowestOddLevel) {
|
||||
int i = levelStart;
|
||||
|
||||
for (;;) {
|
||||
while (i < levelLimit && levels[i] < highestLevel) {
|
||||
i++;
|
||||
}
|
||||
int begin = i++;
|
||||
|
||||
if (begin == levelLimit) {
|
||||
break; // no more runs at this level
|
||||
}
|
||||
|
||||
while (i < levelLimit && levels[i] >= highestLevel) {
|
||||
i++;
|
||||
}
|
||||
int end = i - 1;
|
||||
|
||||
begin += delta;
|
||||
end += delta;
|
||||
while (begin < end) {
|
||||
Object temp = objects[begin];
|
||||
objects[begin] = objects[end];
|
||||
objects[end] = temp;
|
||||
++begin;
|
||||
--end;
|
||||
}
|
||||
}
|
||||
|
||||
--highestLevel;
|
||||
}
|
||||
BidiBase.reorderVisually(levels, levelStart, objects, objectStart, count);
|
||||
}
|
||||
|
||||
private static final char NUMLEVELS = 62;
|
||||
|
||||
private static final int RMASK =
|
||||
(1 << 1 /* U_RIGHT_TO_LEFT */) |
|
||||
(1 << 5 /* U_ARABIC_NUMBER */) |
|
||||
(1 << 13 /* U_RIGHT_TO_LEFT_ARABIC */) |
|
||||
(1 << 14 /* U_RIGHT_TO_LEFT_EMBEDDING */) |
|
||||
(1 << 15 /* U_RIGHT_TO_LEFT_OVERRIDE */);
|
||||
|
||||
/** Access native bidi implementation. */
|
||||
private static native int nativeGetDirectionCode(int cp);
|
||||
|
||||
/** Access native bidi implementation. */
|
||||
private static synchronized native void nativeBidiChars(Bidi bidi, char[] text, int textStart,
|
||||
byte[] embeddings, int embeddingStart,
|
||||
int length, int flags);
|
||||
|
||||
/**
|
||||
* Display the bidi internal state, used in debugging.
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuffer buf = new StringBuffer(super.toString());
|
||||
buf.append("[dir: " + dir);
|
||||
buf.append(" baselevel: " + baselevel);
|
||||
buf.append(" length: " + length);
|
||||
if (runs == null) {
|
||||
buf.append(" runs: null");
|
||||
} else {
|
||||
buf.append(" runs: [");
|
||||
for (int i = 0; i < runs.length; i += 2) {
|
||||
if (i != 0) {
|
||||
buf.append(' ');
|
||||
}
|
||||
buf.append(runs[i]); // limit
|
||||
buf.append('/');
|
||||
buf.append(runs[i+1]); // level
|
||||
}
|
||||
buf.append(']');
|
||||
}
|
||||
if (cws == null) {
|
||||
buf.append(" cws: null");
|
||||
} else {
|
||||
buf.append(" cws: [");
|
||||
for (int i = 0; i < cws.length; ++i) {
|
||||
if (i != 0) {
|
||||
buf.append(' ');
|
||||
}
|
||||
buf.append(Integer.toHexString(cws[i]));
|
||||
}
|
||||
buf.append(']');
|
||||
}
|
||||
buf.append(']');
|
||||
|
||||
return buf.toString();
|
||||
return bidiBase.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,6 +29,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.io.*;
|
||||
|
||||
import sun.misc.JavaLangAccess;
|
||||
import sun.misc.SharedSecrets;
|
||||
|
||||
/**
|
||||
* LogRecord objects are used to pass logging requests between
|
||||
* the logging framework and individual log Handlers.
|
||||
@ -522,29 +525,31 @@ public class LogRecord implements java.io.Serializable {
|
||||
// Private method to infer the caller's class and method names
|
||||
private void inferCaller() {
|
||||
needToInferCaller = false;
|
||||
// Get the stack trace.
|
||||
StackTraceElement stack[] = (new Throwable()).getStackTrace();
|
||||
// First, search back to a method in the Logger class.
|
||||
int ix = 0;
|
||||
while (ix < stack.length) {
|
||||
StackTraceElement frame = stack[ix];
|
||||
JavaLangAccess access = SharedSecrets.getJavaLangAccess();
|
||||
Throwable throwable = new Throwable();
|
||||
int depth = access.getStackTraceDepth(throwable);
|
||||
|
||||
String logClassName = "java.util.logging.Logger";
|
||||
boolean lookingForLogger = true;
|
||||
for (int ix = 0; ix < depth; ix++) {
|
||||
// Calling getStackTraceElement directly prevents the VM
|
||||
// from paying the cost of building the entire stack frame.
|
||||
StackTraceElement frame =
|
||||
access.getStackTraceElement(throwable, ix);
|
||||
String cname = frame.getClassName();
|
||||
if (cname.equals("java.util.logging.Logger")) {
|
||||
break;
|
||||
if (lookingForLogger) {
|
||||
// Skip all frames until we have found the first logger frame.
|
||||
if (cname.equals(logClassName)) {
|
||||
lookingForLogger = false;
|
||||
}
|
||||
} else {
|
||||
if (!cname.equals(logClassName)) {
|
||||
// We've found the relevant frame.
|
||||
setSourceClassName(cname);
|
||||
setSourceMethodName(frame.getMethodName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
ix++;
|
||||
}
|
||||
// Now search for the first frame before the "Logger" class.
|
||||
while (ix < stack.length) {
|
||||
StackTraceElement frame = stack[ix];
|
||||
String cname = frame.getClassName();
|
||||
if (!cname.equals("java.util.logging.Logger")) {
|
||||
// We've found the relevant frame.
|
||||
setSourceClassName(cname);
|
||||
setSourceMethodName(frame.getMethodName());
|
||||
return;
|
||||
}
|
||||
ix++;
|
||||
}
|
||||
// We haven't found a suitable frame, so just punt. This is
|
||||
// OK as we are only committed to making a "best effort" here.
|
||||
|
@ -49,6 +49,7 @@ package java.util.zip;
|
||||
* compresser.setInput(input);
|
||||
* compresser.finish();
|
||||
* int compressedDataLength = compresser.deflate(output);
|
||||
* compresser.end();
|
||||
*
|
||||
* // Decompress the bytes
|
||||
* Inflater decompresser = new Inflater();
|
||||
|
@ -32,6 +32,8 @@ import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Vector;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.NoSuchElementException;
|
||||
import static java.util.zip.ZipConstants64.*;
|
||||
|
||||
@ -277,6 +279,9 @@ class ZipFile implements ZipConstants {
|
||||
// freeEntry releases the C jzentry struct.
|
||||
private static native void freeEntry(long jzfile, long jzentry);
|
||||
|
||||
// the outstanding inputstreams that need to be closed.
|
||||
private Set<ZipFileInputStream> streams = new HashSet<ZipFileInputStream>();
|
||||
|
||||
/**
|
||||
* Returns an input stream for reading the contents of the specified
|
||||
* zip file entry.
|
||||
@ -308,6 +313,7 @@ class ZipFile implements ZipConstants {
|
||||
return null;
|
||||
}
|
||||
in = new ZipFileInputStream(jzentry);
|
||||
streams.add(in);
|
||||
}
|
||||
final ZipFileInputStream zfin = in;
|
||||
switch (getEntryMethod(jzentry)) {
|
||||
@ -323,7 +329,7 @@ class ZipFile implements ZipConstants {
|
||||
|
||||
public void close() throws IOException {
|
||||
if (!isClosed) {
|
||||
releaseInflater(inf);
|
||||
releaseInflater(inf);
|
||||
this.in.close();
|
||||
isClosed = true;
|
||||
}
|
||||
@ -497,6 +503,13 @@ class ZipFile implements ZipConstants {
|
||||
synchronized (this) {
|
||||
closeRequested = true;
|
||||
|
||||
if (streams.size() !=0) {
|
||||
Set<ZipFileInputStream> copy = streams;
|
||||
streams = new HashSet<ZipFileInputStream>();
|
||||
for (ZipFileInputStream is: copy)
|
||||
is.close();
|
||||
}
|
||||
|
||||
if (jzfile != 0) {
|
||||
// Close the zip file
|
||||
long zf = this.jzfile;
|
||||
@ -631,9 +644,9 @@ class ZipFile implements ZipConstants {
|
||||
freeEntry(ZipFile.this.jzfile, jzentry);
|
||||
jzentry = 0;
|
||||
}
|
||||
streams.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-2009 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
|
||||
@ -234,56 +234,58 @@ public abstract class Configuration {
|
||||
*
|
||||
* @see #setConfiguration
|
||||
*/
|
||||
public static synchronized Configuration getConfiguration() {
|
||||
public static Configuration getConfiguration() {
|
||||
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null)
|
||||
sm.checkPermission(new AuthPermission("getLoginConfiguration"));
|
||||
|
||||
if (configuration == null) {
|
||||
String config_class = null;
|
||||
config_class = AccessController.doPrivileged
|
||||
(new PrivilegedAction<String>() {
|
||||
public String run() {
|
||||
return java.security.Security.getProperty
|
||||
("login.configuration.provider");
|
||||
}
|
||||
});
|
||||
if (config_class == null) {
|
||||
config_class = "com.sun.security.auth.login.ConfigFile";
|
||||
}
|
||||
|
||||
try {
|
||||
final String finalClass = config_class;
|
||||
configuration = AccessController.doPrivileged
|
||||
(new PrivilegedExceptionAction<Configuration>() {
|
||||
public Configuration run() throws ClassNotFoundException,
|
||||
InstantiationException,
|
||||
IllegalAccessException {
|
||||
return (Configuration)Class.forName
|
||||
(finalClass,
|
||||
true,
|
||||
contextClassLoader).newInstance();
|
||||
synchronized (Configuration.class) {
|
||||
if (configuration == null) {
|
||||
String config_class = null;
|
||||
config_class = AccessController.doPrivileged
|
||||
(new PrivilegedAction<String>() {
|
||||
public String run() {
|
||||
return java.security.Security.getProperty
|
||||
("login.configuration.provider");
|
||||
}
|
||||
});
|
||||
} catch (PrivilegedActionException e) {
|
||||
Exception ee = e.getException();
|
||||
if (ee instanceof InstantiationException) {
|
||||
throw (SecurityException) new
|
||||
SecurityException
|
||||
("Configuration error:" +
|
||||
ee.getCause().getMessage() +
|
||||
"\n").initCause(ee.getCause());
|
||||
} else {
|
||||
throw (SecurityException) new
|
||||
SecurityException
|
||||
("Configuration error: " +
|
||||
ee.toString() +
|
||||
"\n").initCause(ee);
|
||||
if (config_class == null) {
|
||||
config_class = "com.sun.security.auth.login.ConfigFile";
|
||||
}
|
||||
|
||||
try {
|
||||
final String finalClass = config_class;
|
||||
configuration = AccessController.doPrivileged
|
||||
(new PrivilegedExceptionAction<Configuration>() {
|
||||
public Configuration run() throws ClassNotFoundException,
|
||||
InstantiationException,
|
||||
IllegalAccessException {
|
||||
return (Configuration)Class.forName
|
||||
(finalClass,
|
||||
true,
|
||||
contextClassLoader).newInstance();
|
||||
}
|
||||
});
|
||||
} catch (PrivilegedActionException e) {
|
||||
Exception ee = e.getException();
|
||||
if (ee instanceof InstantiationException) {
|
||||
throw (SecurityException) new
|
||||
SecurityException
|
||||
("Configuration error:" +
|
||||
ee.getCause().getMessage() +
|
||||
"\n").initCause(ee.getCause());
|
||||
} else {
|
||||
throw (SecurityException) new
|
||||
SecurityException
|
||||
("Configuration error: " +
|
||||
ee.toString() +
|
||||
"\n").initCause(ee);
|
||||
}
|
||||
}
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
return configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,70 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM1381;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp1381 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp1381
|
||||
extends ByteToCharDBCS_ASCII
|
||||
public class ByteToCharCp1381 extends ByteToCharDBCS_ASCII {
|
||||
|
||||
{
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp1381";
|
||||
}
|
||||
|
||||
private final static IBM1381 nioCoder = new IBM1381();
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp1381";
|
||||
}
|
||||
|
||||
|
||||
private static final boolean leadByte[] = {
|
||||
false, false, false, false, false, false, false, false, // 00 - 07
|
||||
false, false, false, false, false, false, false, false, // 08 - 0F
|
||||
false, false, false, false, false, false, false, false, // 10 - 17
|
||||
false, false, false, false, false, false, false, false, // 18 - 1F
|
||||
false, false, false, false, false, false, false, false, // 20 - 27
|
||||
false, false, false, false, false, false, false, false, // 28 - 2F
|
||||
false, false, false, false, false, false, false, false, // 30 - 37
|
||||
false, false, false, false, false, false, false, false, // 38 - 3F
|
||||
false, false, false, false, false, false, false, false, // 40 - 47
|
||||
false, false, false, false, false, false, false, false, // 48 - 4F
|
||||
false, false, false, false, false, false, false, false, // 50 - 57
|
||||
false, false, false, false, false, false, false, false, // 58 - 5F
|
||||
false, false, false, false, false, false, false, false, // 60 - 67
|
||||
false, false, false, false, false, false, false, false, // 68 - 6F
|
||||
false, false, false, false, false, false, false, false, // 70 - 77
|
||||
false, false, false, false, false, false, false, false, // 78 - 7F
|
||||
false, false, false, false, false, false, false, false, // 80 - 87
|
||||
false, false, false, false, true, true, true, true, // 88 - 8F
|
||||
true, true, true, true, true, true, true, true, // 90 - 97
|
||||
true, true, true, true, true, true, true, true, // 98 - 9F
|
||||
true, true, true, true, true, true, true, true, // A0 - A7
|
||||
true, true, false, false, false, false, false, false, // A8 - AF
|
||||
true, true, true, true, true, true, true, true, // B0 - B7
|
||||
true, true, true, true, true, true, true, true, // B8 - BF
|
||||
true, true, true, true, true, true, true, true, // C0 - C7
|
||||
true, true, true, true, true, true, true, true, // C8 - CF
|
||||
true, true, true, true, true, true, true, true, // D0 - D7
|
||||
true, true, true, true, true, true, true, true, // D8 - DF
|
||||
true, true, true, true, true, true, true, true, // E0 - E7
|
||||
true, true, true, true, true, true, true, true, // E8 - EF
|
||||
true, true, true, true, true, true, true, true, // F0 - F7
|
||||
false, false, false, false, false, false, false, false, // F8 - FF
|
||||
};
|
||||
|
||||
public ByteToCharCp1381() {
|
||||
super();
|
||||
super.mask1 = 0xFFE0;
|
||||
super.mask2 = 0x001F;
|
||||
super.shift = 5;
|
||||
super.leadByte = this.leadByte;
|
||||
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp1381() {
|
||||
super((DoubleByte.Decoder)new IBM1381().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,31 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM1383;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* A table to convert Cp1383 to Unicode
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp1383
|
||||
extends ByteToCharEUC
|
||||
public class ByteToCharCp1383 extends ByteToCharEUC2 {
|
||||
|
||||
{
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp1383";
|
||||
}
|
||||
|
||||
private final static IBM1383 nioCoder = new IBM1383();
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp1383";
|
||||
}
|
||||
|
||||
public ByteToCharCp1383()
|
||||
{
|
||||
// Set the correct mapping table
|
||||
super();
|
||||
super.byteToCharTable = nioCoder.getDecoderSingleByteMappings();
|
||||
super.mappingTableG1 = nioCoder.getDecoderMappingTableG1();
|
||||
}
|
||||
public ByteToCharCp1383() {
|
||||
super((DoubleByte.Decoder)new IBM1383().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,131 +24,15 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM933;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
public class ByteToCharCp834 extends ByteToCharDBCS_ASCII {
|
||||
|
||||
public class ByteToCharCp834 extends ByteToCharDBCS_ONLY_EBCDIC {
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp834";
|
||||
}
|
||||
|
||||
public ByteToCharCp834() {
|
||||
super();
|
||||
super.mask1 = 0xFFF0;
|
||||
super.mask2 = 0x000F;
|
||||
super.shift = 4;
|
||||
super.index1 = IBM933.getDecoderIndex1();
|
||||
super.index2 = IBM933.getDecoderIndex2();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class ByteToCharDBCS_ONLY_EBCDIC extends ByteToCharConverter {
|
||||
private boolean savedBytePresent;
|
||||
private byte savedByte;
|
||||
|
||||
protected short index1[];
|
||||
protected String index2;
|
||||
protected int mask1;
|
||||
protected int mask2;
|
||||
protected int shift;
|
||||
|
||||
public ByteToCharDBCS_ONLY_EBCDIC() {
|
||||
super();
|
||||
savedBytePresent = false;
|
||||
}
|
||||
|
||||
public int flush(char [] output, int outStart, int outEnd)
|
||||
throws MalformedInputException
|
||||
{
|
||||
if (savedBytePresent) {
|
||||
reset();
|
||||
badInputLength = 0;
|
||||
throw new MalformedInputException();
|
||||
}
|
||||
reset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Character conversion
|
||||
*/
|
||||
public int convert(byte[] input, int inOff, int inEnd,
|
||||
char[] output, int outOff, int outEnd)
|
||||
throws UnknownCharacterException, MalformedInputException,
|
||||
ConversionBufferFullException
|
||||
{
|
||||
int inputSize;
|
||||
char outputChar = '\uFFFD';
|
||||
|
||||
charOff = outOff;
|
||||
byteOff = inOff;
|
||||
|
||||
while(byteOff < inEnd) {
|
||||
int byte1, byte2;
|
||||
int v;
|
||||
|
||||
if (!savedBytePresent) {
|
||||
byte1 = input[byteOff] & 0xff;
|
||||
inputSize = 1;
|
||||
} else {
|
||||
byte1 = savedByte;
|
||||
savedBytePresent = false;
|
||||
inputSize = 0;
|
||||
}
|
||||
|
||||
// valid range of 1st bytes
|
||||
if (byte1 < 0x40 || byte1 > 0xfe) {
|
||||
badInputLength = 1;
|
||||
throw new MalformedInputException();
|
||||
}
|
||||
|
||||
if (byteOff + inputSize >= inEnd) {
|
||||
// We have been split in the middle if a character
|
||||
// save the first byte for next time around
|
||||
savedByte = (byte)byte1;
|
||||
savedBytePresent = true;
|
||||
byteOff += inputSize;
|
||||
break;
|
||||
}
|
||||
|
||||
byte2 = input[byteOff+inputSize] & 0xff;
|
||||
inputSize++;
|
||||
|
||||
// validate the pair of bytes
|
||||
if ((byte1 != 0x40 || byte2 != 0x40) &&
|
||||
(byte2 < 0x41 || byte2 > 0xfe)) {
|
||||
badInputLength = 2;
|
||||
throw new MalformedInputException();
|
||||
}
|
||||
|
||||
// Lookup in the two level index
|
||||
v = byte1 * 256 + byte2;
|
||||
outputChar = index2.charAt(index1[((v & mask1) >> shift)]
|
||||
+ (v & mask2));
|
||||
|
||||
if (outputChar == '\uFFFD') {
|
||||
if (subMode)
|
||||
outputChar = subChars[0];
|
||||
else {
|
||||
badInputLength = inputSize;
|
||||
throw new UnknownCharacterException();
|
||||
}
|
||||
}
|
||||
|
||||
if (charOff >= outEnd)
|
||||
throw new ConversionBufferFullException();
|
||||
|
||||
output[charOff++] = outputChar;
|
||||
byteOff += inputSize;
|
||||
}
|
||||
return charOff - outOff;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the converter.
|
||||
*/
|
||||
public void reset() {
|
||||
charOff = byteOff = 0;
|
||||
savedBytePresent = false;
|
||||
super((DoubleByte.Decoder)new IBM834().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,32 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM930;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp930 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp930
|
||||
extends ByteToCharDBCS_EBCDIC
|
||||
public class ByteToCharCp930 extends ByteToCharDBCS_EBCDIC {
|
||||
|
||||
{
|
||||
private static IBM930 nioCoder = new IBM930();
|
||||
// Return the character set id
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp930";
|
||||
}
|
||||
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp930";
|
||||
}
|
||||
|
||||
public ByteToCharCp930() {
|
||||
super();
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp930() {
|
||||
super((DoubleByte.Decoder)new IBM930().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,33 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM933;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp933 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp933
|
||||
extends ByteToCharDBCS_EBCDIC
|
||||
public class ByteToCharCp933 extends ByteToCharDBCS_EBCDIC {
|
||||
|
||||
{
|
||||
private final static IBM933 nioCoder = new IBM933();
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp933";
|
||||
}
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp933";
|
||||
}
|
||||
|
||||
|
||||
public ByteToCharCp933() {
|
||||
super();
|
||||
super.mask1 = 0xFFF0;
|
||||
super.mask2 = 0x000F;
|
||||
super.shift = 4;
|
||||
super.singleByteToChar = nioCoder.getDecoderSingleByteMappings();
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp933() {
|
||||
super((DoubleByte.Decoder)new IBM933().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,33 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM935;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp935 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp935
|
||||
extends ByteToCharDBCS_EBCDIC
|
||||
public class ByteToCharCp935 extends ByteToCharDBCS_EBCDIC {
|
||||
|
||||
{
|
||||
private static IBM935 nioCoder = new IBM935();
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp935";
|
||||
}
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp935";
|
||||
}
|
||||
|
||||
|
||||
public ByteToCharCp935() {
|
||||
super();
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super.singleByteToChar = nioCoder.getDecoderByteToCharMappings();
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp935() {
|
||||
super((DoubleByte.Decoder)new IBM935().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -23,33 +23,17 @@
|
||||
* have any questions.
|
||||
*/
|
||||
package sun.io;
|
||||
import sun.nio.cs.ext.IBM937;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp937 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp937
|
||||
extends ByteToCharDBCS_EBCDIC
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
{
|
||||
private final static IBM937 nioCoder = new IBM937();
|
||||
public class ByteToCharCp937 extends ByteToCharDBCS_EBCDIC {
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp937";
|
||||
}
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp937";
|
||||
}
|
||||
|
||||
|
||||
public ByteToCharCp937() {
|
||||
super();
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super.singleByteToChar = nioCoder.getDecoderByteToCharMappings();
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp937() {
|
||||
super((DoubleByte.Decoder)new IBM937().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,32 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM939;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp939 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp939
|
||||
extends ByteToCharDBCS_EBCDIC
|
||||
public class ByteToCharCp939 extends ByteToCharDBCS_EBCDIC {
|
||||
|
||||
{
|
||||
private final static IBM939 nioCoder = new IBM939();
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp939";
|
||||
}
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp939";
|
||||
}
|
||||
|
||||
public ByteToCharCp939() {
|
||||
super();
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super.singleByteToChar = nioCoder.getDecoderByteToCharMappings();
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp939() {
|
||||
super((DoubleByte.Decoder)new IBM939().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,105 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM942;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp942 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp942
|
||||
extends ByteToCharDBCS_ASCII
|
||||
public class ByteToCharCp942 extends ByteToCharDBCS_ASCII {
|
||||
|
||||
{
|
||||
private static IBM942 nioCoder = new IBM942();
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp942";
|
||||
}
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp942";
|
||||
}
|
||||
|
||||
|
||||
private static final boolean leadByte[] = {
|
||||
false, false, false, false, false, false, false, false, // 00 - 07
|
||||
false, false, false, false, false, false, false, false, // 08 - 0F
|
||||
false, false, false, false, false, false, false, false, // 10 - 17
|
||||
false, false, false, false, false, false, false, false, // 18 - 1F
|
||||
false, false, false, false, false, false, false, false, // 20 - 27
|
||||
false, false, false, false, false, false, false, false, // 28 - 2F
|
||||
false, false, false, false, false, false, false, false, // 30 - 37
|
||||
false, false, false, false, false, false, false, false, // 38 - 3F
|
||||
false, false, false, false, false, false, false, false, // 40 - 47
|
||||
false, false, false, false, false, false, false, false, // 48 - 4F
|
||||
false, false, false, false, false, false, false, false, // 50 - 57
|
||||
false, false, false, false, false, false, false, false, // 58 - 5F
|
||||
false, false, false, false, false, false, false, false, // 60 - 67
|
||||
false, false, false, false, false, false, false, false, // 68 - 6F
|
||||
false, false, false, false, false, false, false, false, // 70 - 77
|
||||
false, false, false, false, false, false, false, false, // 78 - 7F
|
||||
false, true, true, true, true, false, false, false, // 80 - 87
|
||||
true, true, true, true, true, true, true, true, // 88 - 8F
|
||||
true, true, true, true, true, true, true, true, // 90 - 97
|
||||
true, true, true, true, true, true, true, true, // 98 - 9F
|
||||
false, false, false, false, false, false, false, false, // A0 - A7
|
||||
false, false, false, false, false, false, false, false, // A8 - AF
|
||||
false, false, false, false, false, false, false, false, // B0 - B7
|
||||
false, false, false, false, false, false, false, false, // B8 - BF
|
||||
false, false, false, false, false, false, false, false, // C0 - C7
|
||||
false, false, false, false, false, false, false, false, // C8 - CF
|
||||
false, false, false, false, false, false, false, false, // D0 - D7
|
||||
false, false, false, false, false, false, false, false, // D8 - DF
|
||||
true, true, true, true, true, true, true, true, // E0 - E7
|
||||
true, true, true, false, false, false, false, false, // E8 - EF
|
||||
true, true, true, true, true, true, true, true, // F0 - F7
|
||||
true, true, true, true, true, false, false, false, // F8 - FF
|
||||
};
|
||||
|
||||
|
||||
private static final String singleByteToChar =
|
||||
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" +
|
||||
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F" +
|
||||
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" +
|
||||
"\u0018\u0019\u001C\u001B\u007F\u001D\u001E\u001F" +
|
||||
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027" +
|
||||
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F" +
|
||||
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037" +
|
||||
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F" +
|
||||
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047" +
|
||||
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F" +
|
||||
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057" +
|
||||
"\u0058\u0059\u005A\u005B\u00A5\u005D\u005E\u005F" +
|
||||
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +
|
||||
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F" +
|
||||
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077" +
|
||||
"\u0078\u0079\u007A\u007B\u007C\u007D\u203E\u001A" +
|
||||
"\u00A2\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\u00A3\uFF61\uFF62\uFF63\uFF64\uFF65\uFF66\uFF67" +
|
||||
"\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F" +
|
||||
"\uFF70\uFF71\uFF72\uFF73\uFF74\uFF75\uFF76\uFF77" +
|
||||
"\uFF78\uFF79\uFF7A\uFF7B\uFF7C\uFF7D\uFF7E\uFF7F" +
|
||||
"\uFF80\uFF81\uFF82\uFF83\uFF84\uFF85\uFF86\uFF87" +
|
||||
"\uFF88\uFF89\uFF8A\uFF8B\uFF8C\uFF8D\uFF8E\uFF8F" +
|
||||
"\uFF90\uFF91\uFF92\uFF93\uFF94\uFF95\uFF96\uFF97" +
|
||||
"\uFF98\uFF99\uFF9A\uFF9B\uFF9C\uFF9D\uFF9E\uFF9F" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00AC\\\u007E"
|
||||
;
|
||||
|
||||
public ByteToCharCp942() {
|
||||
super();
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super.leadByte = this.leadByte;
|
||||
super.singleByteToChar = this.singleByteToChar;
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp942() {
|
||||
super((DoubleByte.Decoder)new IBM942().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -25,44 +25,16 @@
|
||||
|
||||
package sun.io;
|
||||
|
||||
import sun.io.*;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
public class ByteToCharCp942C extends ByteToCharDBCS_ASCII {
|
||||
protected static final String singleByteToChar;
|
||||
protected static final boolean leadByte[];
|
||||
protected static final short index1[];
|
||||
protected static final String index2;
|
||||
protected static final int mask1;
|
||||
protected static final int mask2;
|
||||
protected static final int shift;
|
||||
|
||||
static {
|
||||
ByteToCharDBCS_ASCII y = new ByteToCharCp942();
|
||||
mask1 = y.mask1;
|
||||
mask2 = y.mask2;
|
||||
shift = y.shift;
|
||||
leadByte = y.leadByte;
|
||||
index1 = y.index1;
|
||||
index2 = y.index2;
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp942C";
|
||||
}
|
||||
|
||||
/* Fix converter to pass through 0x00 to 0x7f unchanged to U+0000 to U+007F */
|
||||
String indexs = "";
|
||||
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
|
||||
singleByteToChar = indexs + y.singleByteToChar.substring(indexs.length());
|
||||
}
|
||||
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp942C";
|
||||
}
|
||||
|
||||
ByteToCharCp942C() {
|
||||
super();
|
||||
super.mask1 = mask1;
|
||||
super.mask2 = mask2;
|
||||
super.shift = shift;
|
||||
super.leadByte = leadByte;
|
||||
super.singleByteToChar = singleByteToChar;
|
||||
super.index1 = index1;
|
||||
super.index2 = index2;
|
||||
}
|
||||
public ByteToCharCp942C() {
|
||||
super((DoubleByte.Decoder)new IBM942C().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -22,102 +22,19 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
// Table from Cp943 to Unicode
|
||||
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM943;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp943 to Unicode
|
||||
*
|
||||
* @author BuildTable tool
|
||||
*/
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
public class ByteToCharCp943 extends ByteToCharDBCS_ASCII {
|
||||
|
||||
private static IBM943 nioCoder = new IBM943();
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp943";
|
||||
}
|
||||
|
||||
public ByteToCharCp943() {
|
||||
super();
|
||||
super.leadByte = this.leadByte;
|
||||
super.singleByteToChar = this.singleByteToChar;
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super((DoubleByte.Decoder)new IBM943().newDecoder());
|
||||
}
|
||||
|
||||
private static final boolean leadByte[] = {
|
||||
false, false, false, false, false, false, false, false, // 00 - 07
|
||||
false, false, false, false, false, false, false, false, // 08 - 0F
|
||||
false, false, false, false, false, false, false, false, // 10 - 17
|
||||
false, false, false, false, false, false, false, false, // 18 - 1F
|
||||
false, false, false, false, false, false, false, false, // 20 - 27
|
||||
false, false, false, false, false, false, false, false, // 28 - 2F
|
||||
false, false, false, false, false, false, false, false, // 30 - 37
|
||||
false, false, false, false, false, false, false, false, // 38 - 3F
|
||||
false, false, false, false, false, false, false, false, // 40 - 47
|
||||
false, false, false, false, false, false, false, false, // 48 - 4F
|
||||
false, false, false, false, false, false, false, false, // 50 - 57
|
||||
false, false, false, false, false, false, false, false, // 58 - 5F
|
||||
false, false, false, false, false, false, false, false, // 60 - 67
|
||||
false, false, false, false, false, false, false, false, // 68 - 6F
|
||||
false, false, false, false, false, false, false, false, // 70 - 77
|
||||
false, false, false, false, false, false, false, false, // 78 - 7F
|
||||
false, true, true, true, true, false, false, true, // 80 - 87
|
||||
true, true, true, true, true, true, true, true, // 88 - 8F
|
||||
true, true, true, true, true, true, true, true, // 90 - 97
|
||||
true, true, true, true, true, true, true, true, // 98 - 9F
|
||||
false, false, false, false, false, false, false, false, // A0 - A7
|
||||
false, false, false, false, false, false, false, false, // A8 - AF
|
||||
false, false, false, false, false, false, false, false, // B0 - B7
|
||||
false, false, false, false, false, false, false, false, // B8 - BF
|
||||
false, false, false, false, false, false, false, false, // C0 - C7
|
||||
false, false, false, false, false, false, false, false, // C8 - CF
|
||||
false, false, false, false, false, false, false, false, // D0 - D7
|
||||
false, false, false, false, false, false, false, false, // D8 - DF
|
||||
true, true, true, true, true, true, true, true, // E0 - E7
|
||||
true, true, true, true, true, true, true, false, // E8 - EF
|
||||
true, true, true, true, true, true, true, true, // F0 - F7
|
||||
true, true, true, true, true, false, false, false, // F8 - FF
|
||||
};
|
||||
static final String singleByteToChar =
|
||||
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"+ // 0-7
|
||||
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F"+ // 8-F
|
||||
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"+ // 10-17
|
||||
"\u0018\u0019\u001C\u001B\u007F\u001D\u001E\u001F"+ // 18-1F
|
||||
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027"+ // 20-27
|
||||
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F"+ // 28-2F
|
||||
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037"+ // 30-37
|
||||
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F"+ // 38-3F
|
||||
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047"+ // 40-47
|
||||
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F"+ // 48-4F
|
||||
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057"+ // 50-57
|
||||
"\u0058\u0059\u005A\u005B\u00A5\u005D\u005E\u005F"+ // 58-5F
|
||||
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067"+ // 60-67
|
||||
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F"+ // 68-6F
|
||||
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077"+ // 70-77
|
||||
"\u0078\u0079\u007A\u007B\u007C\u007D\u203E\u001A"+ // 78-7F
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 80-87
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 88-8F
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 90-97
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // 98-9F
|
||||
"\uFFFD\uFF61\uFF62\uFF63\uFF64\uFF65\uFF66\uFF67"+ // A0-A7
|
||||
"\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F"+ // A8-AF
|
||||
"\uFF70\uFF71\uFF72\uFF73\uFF74\uFF75\uFF76\uFF77"+ // B0-B7
|
||||
"\uFF78\uFF79\uFF7A\uFF7B\uFF7C\uFF7D\uFF7E\uFF7F"+ // B8-BF
|
||||
"\uFF80\uFF81\uFF82\uFF83\uFF84\uFF85\uFF86\uFF87"+ // C0-C7
|
||||
"\uFF88\uFF89\uFF8A\uFF8B\uFF8C\uFF8D\uFF8E\uFF8F"+ // C8-CF
|
||||
"\uFF90\uFF91\uFF92\uFF93\uFF94\uFF95\uFF96\uFF97"+ // D0-D7
|
||||
"\uFF98\uFF99\uFF9A\uFF9B\uFF9C\uFF9D\uFF9E\uFF9F"+ // D8-DF
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // E0-E7
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // E8-EF
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"+ // F0-F7
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"; // F8-FF
|
||||
}
|
||||
|
@ -25,44 +25,16 @@
|
||||
|
||||
package sun.io;
|
||||
|
||||
import sun.io.*;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
public class ByteToCharCp943C extends ByteToCharDBCS_ASCII {
|
||||
protected static final String singleByteToChar;
|
||||
protected static final boolean leadByte[];
|
||||
protected static final short index1[];
|
||||
protected static final String index2;
|
||||
protected static final int mask1;
|
||||
protected static final int mask2;
|
||||
protected static final int shift;
|
||||
|
||||
static {
|
||||
ByteToCharDBCS_ASCII y = new ByteToCharCp943();
|
||||
mask1 = y.mask1;
|
||||
mask2 = y.mask2;
|
||||
shift = y.shift;
|
||||
leadByte = y.leadByte;
|
||||
index1 = y.index1;
|
||||
index2 = y.index2;
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp943C";
|
||||
}
|
||||
|
||||
/* Fix converter to pass through 0x00 to 0x7f unchanged to U+0000 to U+007F */
|
||||
String indexs = "";
|
||||
for (char c = '\0'; c < '\u0080'; ++c) indexs += c;
|
||||
singleByteToChar = indexs + y.singleByteToChar.substring(indexs.length());
|
||||
}
|
||||
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp943C";
|
||||
}
|
||||
|
||||
ByteToCharCp943C() {
|
||||
super();
|
||||
super.mask1 = mask1;
|
||||
super.mask2 = mask2;
|
||||
super.shift = shift;
|
||||
super.leadByte = leadByte;
|
||||
super.singleByteToChar = singleByteToChar;
|
||||
super.index1 = index1;
|
||||
super.index2 = index2;
|
||||
}
|
||||
public ByteToCharCp943C() {
|
||||
super((DoubleByte.Decoder)new IBM943C().newDecoder());
|
||||
}
|
||||
}
|
||||
|
@ -24,105 +24,16 @@
|
||||
*/
|
||||
package sun.io;
|
||||
|
||||
import sun.nio.cs.ext.IBM948;
|
||||
import sun.nio.cs.ext.*;
|
||||
|
||||
/**
|
||||
* Tables and data to convert Cp948 to Unicode.
|
||||
*
|
||||
* @author Malcolm Ayres, assisted by UniMap program
|
||||
*/
|
||||
public class ByteToCharCp948
|
||||
extends ByteToCharDBCS_ASCII
|
||||
public class ByteToCharCp948 extends ByteToCharDBCS_ASCII {
|
||||
|
||||
{
|
||||
private static IBM948 nioCoder = new IBM948();
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding() {
|
||||
return "Cp948";
|
||||
}
|
||||
|
||||
// Return the character set id
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
return "Cp948";
|
||||
}
|
||||
|
||||
|
||||
private static final boolean leadByte[] = {
|
||||
false, false, false, false, false, false, false, false, // 00 - 07
|
||||
false, false, false, false, false, false, false, false, // 08 - 0F
|
||||
false, false, false, false, false, false, false, false, // 10 - 17
|
||||
false, false, false, false, false, false, false, false, // 18 - 1F
|
||||
false, false, false, false, false, false, false, false, // 20 - 27
|
||||
false, false, false, false, false, false, false, false, // 28 - 2F
|
||||
false, false, false, false, false, false, false, false, // 30 - 37
|
||||
false, false, false, false, false, false, false, false, // 38 - 3F
|
||||
false, false, false, false, false, false, false, false, // 40 - 47
|
||||
false, false, false, false, false, false, false, false, // 48 - 4F
|
||||
false, false, false, false, false, false, false, false, // 50 - 57
|
||||
false, false, false, false, false, false, false, false, // 58 - 5F
|
||||
false, false, false, false, false, false, false, false, // 60 - 67
|
||||
false, false, false, false, false, false, false, false, // 68 - 6F
|
||||
false, false, false, false, false, false, false, false, // 70 - 77
|
||||
false, false, false, false, false, false, false, false, // 78 - 7F
|
||||
false, true, true, true, true, false, true, true, // 80 - 87
|
||||
true, true, true, true, true, true, true, true, // 88 - 8F
|
||||
true, true, true, true, true, true, true, true, // 90 - 97
|
||||
true, true, true, true, true, true, true, true, // 98 - 9F
|
||||
true, true, true, true, true, true, true, true, // A0 - A7
|
||||
true, true, true, true, true, true, true, true, // A8 - AF
|
||||
true, true, true, true, true, true, true, true, // B0 - B7
|
||||
true, true, true, true, true, true, true, true, // B8 - BF
|
||||
true, true, true, true, true, true, true, true, // C0 - C7
|
||||
true, true, true, true, true, true, true, true, // C8 - CF
|
||||
true, true, false, false, false, false, false, false, // D0 - D7
|
||||
false, false, false, true, true, true, true, true, // D8 - DF
|
||||
true, true, true, true, true, true, true, true, // E0 - E7
|
||||
true, true, true, true, true, true, true, true, // E8 - EF
|
||||
true, true, true, true, true, true, true, true, // F0 - F7
|
||||
true, true, true, true, false, false, false, false, // F8 - FF
|
||||
};
|
||||
|
||||
|
||||
private static final String singleByteToChar =
|
||||
"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" +
|
||||
"\u0008\u0009\n\u000B\u000C\r\u000E\u000F" +
|
||||
"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" +
|
||||
"\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" +
|
||||
"\u0020\u0021\"\u0023\u0024\u0025\u0026\u0027" +
|
||||
"\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F" +
|
||||
"\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037" +
|
||||
"\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F" +
|
||||
"\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047" +
|
||||
"\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F" +
|
||||
"\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057" +
|
||||
"\u0058\u0059\u005A\u005B\\\u005D\u005E\u005F" +
|
||||
"\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +
|
||||
"\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F" +
|
||||
"\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077" +
|
||||
"\u0078\u0079\u007A\u007B\u007C\u007D\u007E\u007F" +
|
||||
"\u00A2\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" +
|
||||
"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00AC\u00A6\uFFFD"
|
||||
;
|
||||
|
||||
public ByteToCharCp948() {
|
||||
super();
|
||||
super.mask1 = 0xFFC0;
|
||||
super.mask2 = 0x003F;
|
||||
super.shift = 6;
|
||||
super.leadByte = this.leadByte;
|
||||
super.singleByteToChar = this.singleByteToChar;
|
||||
super.index1 = nioCoder.getDecoderIndex1();
|
||||
super.index2 = nioCoder.getDecoderIndex2();
|
||||
}
|
||||
public ByteToCharCp948() {
|
||||
super((DoubleByte.Decoder)new IBM948().newDecoder());
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user