2006/05/04
JGroups Performance Test from official site
结果大于 10k messages/ second ,这样的性能感觉不错。 (每个 message 1k)
并且JGroups 已经支持了 java nio ,这样当节点再增加时不会因为 Thread 的增多而导致性能下降。
测试结果如下:
The JGroups PerfTests (http://wiki.jboss.org/wiki/Wiki.jsp?page=PerfTests) measures the time to send N messages to all members of a group. It computes messages/sec and throughput for each member in the group. Each machine was configured to be a sender and receive every message sent. Each machine sends 1,000,000 messages.
Test Run #
Number of messages read per second
1
13402
2
13155
3
13344
4
13107
Test results using TCP
Test Run #
Number of messages read per second
1
13490
2
13462
3
13476
4
13440
![]()
A 20 million message test was also run to ensure that there are no memory leaks.
测试环境:
Configuring Reader, Writer and Processor Threads
TCP_NIO has configuration settings for the number of reader, writer and processor threads. Generally, setting the number of threads to a smaller number is better than a larger number. As a starting point, try:
reader_threads = 8 * number of CPUs
writer_threads = 8 * number of CPUs
processor_threads = 8 * number of CPUs
processor_minThreads = 8 * number of CPUs
processor_maxThreads = 8 * number of CPUs
processor_keepAlivetime = -1
processor_queueSize = 100
The reader threads read incoming requests and hand the request off to the processor threads to be handled. The processor threads may be disabled (processor_maxThreads is set to zero) so that the incoming requests are handled in the reader threads.
If processor_minThreads is less than processor_maxThreads, new threads will be created to process requests, if and only if, the processor internal queue has processor_queueSize entries in it. This occurs at the time that the next request needs to be processed.
If the internal queue is full and processor_maxThreads threads are busy, the reader thread will block until one of the processor threads completes its work.
Testing environment
Cluster: 4 Dell Optiplex GX260 machines
CPU: Three Intel Pentium 4 2.26GHz and one Pentium 4 2GHz
Memory: 1GB
OS: SUSE Linux Enterprise Server 9 (kernel: 2.6.5)
Switch: 100Mega bit
JGroups configuration file<config>
<TCP_NIO bind_addr="164.99.218.115" recv_buf_size="20000000" send_buf_size="640000"
loopback="false" discard_incompatible_packets="true" max_bundle_size="64000"
max_bundle_timeout="30" use_incoming_packet_handler="true"
use_outgoing_packet_handler="true" down_thread="false" up_thread="false"
enable_bundling="true" start_port="7800" use_send_queues="false"
sock_conn_timeout="300" skip_suspected_members="true"/>
<MPING timeout="2000" num_initial_members="3" mcast_addr="229.6.7.8"
bind_addr="164.99.218.115" down_thread="false" up_thread="false"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000" use_mcast_xmit="false" gc_lag="10"
retransmit_timeout="100,200,300,600,1200,2400,4800" down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" down_thread="false"
up_thread="false" max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000" down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"/>
<FC max_credits="2000000" down_thread="false" up_thread="false" min_threshold="0.10"
max_block_time="1000"/>
</config>
Test 'config.txt' file
num_msgs=1000000 msg_size=1000 num_members=4 num_senders=4
Java
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)”
阿涂 发表于 2006-05-04 17:07 阅读( 1812) 评论( 1) 引用( 6) Java
JGroups and JGroup/ARM
JGroups : http://www.jgroups.org/javagroupsnew/docs/index.html
A Toolkit for Reliable Multicast Communication
JGroup/ARM: http://jgroup.sourceforge.net/index.html
The Jgroup Object Group System / The Autonomous Replication Management (ARM) framework
感觉这两个 framework 做的东西比较类似,并且名字也几乎一样,都是一个 Group Object 的概念。
相比之下, JGroups 实际应用的成功案例更多,大量的其他 OpenSource 软件都使用 JGroups 实现 J2EE Cluster 的状态同步。
http://www.jgroups.org/javagroupsnew/docs/success.html
并且加入了 JBoss 组织,由 JBoss 提供有偿技术支持。
这里有几篇关于 JGroups 评估相关的文章:
http://jmob.objectweb.org/JGroups.html
http://www.inria.fr/rrrt/rr-5336.html
阿涂 发表于 2006-05-04 16:14 阅读( 1615) 评论( 1) 引用( 6) Java
2006/05/01
good java site JavaPolis
just a recordJavaPolis 2005 talks (and DVD) are here...
Every week we'll release JavaPolis 2005 talks on our wiki, let the virtual JavaPolis begin !
阿涂 发表于 2006-05-01 10:21 阅读( 1130) 评论( 0) 引用( 0) Java
2006/04/30
ibm提供的java高性能io -aio4j
What is Asynchronous IO for Java?
Asynchronous IO for JavaTM (AIO4J) is a package that provides the capability to perform input and output (IO) on sockets and files asynchronously -- that is, where the Java application can request the operation but can continue doing useful work while the underlying system performs the operation. The application is informed of the operation's completion later.
This package provides Java applications with capabilities that are now available from most operating systems at the "C" API layer, such as IO Completion Ports on Windows. AIO4J provides Java application programmers with access to these capabilities, but in a way that is very much in keeping with Java idioms and styles of programming.
AIO4J can be used as a replacement for classic synchronous IO and also as an alternative to the New IO package introduced in Java 1.4. AIO4J aims to give performance and scalability that is better than either of these other packages. In particular, AIO4J aims to help Java server applications address what has been called the "C10K problem": building server applications that serve 10,000 clients simultaneously with good responsiveness and performance. This is very difficult with Java synchronous IO because most systems cannot sustain 10,000 threads, and Java New IO does not perform well with such a load.
How does it work?
AIO4J provides a standard Java package of function, layered above a native library that interfaces with the underlying capabilities of the operating system.
The package provides facilities that support a range of programming styles, including Blocking, Polling and Callbacks as techniques for getting notifications of the completion of Read or Write operations.
For Callbacks, the application can control the number and the type of threads that are used.
原文:http://www.alphaworks.ibm.com/tech/aio4j
阿涂 发表于 2006-04-30 15:14 阅读( 1564) 评论( 2) 引用( 0) Java
Java 6.0(Mustang) 支持 epoll 提高 IO 处理性能
To poll or epoll: that is the question: One of the updates in build 59 of Mustang (JavaTM SE 6) is that the New I/O Selector implementation will use the epoll event notification facility when running on the Linux 2.6 kernel. The epoll event mechanism is much more scalable than the traditional poll when there are thousands of file descriptors in the interest set. The work done by poll depends on the size of the interest set whereas with epoll (like Solaris /dev/poll) the registration of interest is separated from the retrieval of the events. A lot has been written on the topic. The C10K problem has been documenting I/O frameworks and strategies for several years. One relatively recent paper on Comparing and Evaluating epoll, select, and poll Event Mechanisms makes it clear the workloads where epoll performs a lot better than poll.
This isn't the first NIO Selector implementation to use epoll. The Blackdown folks added epoll support in their 1.4.x release. On Solaris, the /dev/poll based Selector has been default on Solaris 8 (and newer) since the original implementation of New I/O in J2SETM 1.4.
So if you are running on a Linux 2.6 system with an application that handles lots of simultaneous connections you might want to give b59 a test-run. The weekly builds have been appearing like clockwork on the binary snapshot release site so b59 should be available tomorrow (November 4). Will you see a difference? It depends on the workload. If you've registered lots of SelectableChannels with a Selector and you notice a lot of time spent in the kernel due to poll then you should see a difference. If you are doing test runs and you want to do a direct comparison with poll then you can set the java.nio.channels.spi.SelectorProvider system property to sun.nio.ch.PollSelectorProvider. This will select the poll-based Selector that will continue to be the default on 2.4 kernels. There is an epoll patch for 2.4 kernels but at this time anyway, the NIO implementation doesn't attempt to detect this. ( 十一月 03 2005, 04:19:35 上午 PST ) Permalink Comments [5]
原文:
http://blogs.sun.com/roller/page/alanb?entry=epoll
阿涂 发表于 2006-04-30 15:09 阅读( 1309) 评论( 1) 引用( 0) Java
Open Source JMS 实现列表
ActiveMQ - ActiveMQ is a fast open source JMS 1.1 provider and Message Fabric supporting clustering, peer networks, discovery, TCP, SSL, multicast, persistence, XA and integrates seamlessly into J2EE 1.4 containers, light weight containers and any Java application. ActiveMQ is released under the Apache 2.0 Licence
Features
fully supports JMS 1.1 and J2EE 1.4
includes JCA 1.5 resource adaptors for inbound & outbound messaging so that ActiveMQ should auto-deploy in any J2EE 1.4 compliant server
tested inside Geronimo, Spring and JBoss 4
support for transient, persistent, transactional and XA messaging
supports pluggable transport protocols such as in-VM, TCP, SSL, NIO, UDP, multicast, JGroups and JXTA transports
supports very fast persistence using JDBC along with a high performance journal
designed for high performance clustering, client-server, peer based communication
REST API to provide technology agnostic and language neutral web based API to messaging
Ajax to support web streaming support to web browsers using pure DHTML, allowing web browsers to be part of the messaging fabric
Axis Support so that ActiveMQ can be easily dropped into Apache Axis runtimes to provide reliable messaging
Spring Support so that ActiveMQ can be easily embedded into Spring applications and configured using Springs XML configuration mechanism
can be used as an in memory JMS provider, ideal for unit testing
Wildcard support to subscribe to powerful destination hierarchies.
Composite Destinations support to allow many destinations to be used in one simple atomic JMS operation
JSR 77 / 88 support for easy deployment & management & hot deployment
provides an implementation of ActiveClusterHermes JMS - Hermes is a Swing application that allows you to interact with JMS providers. Hermes will work with any JMS enabled transport making it easy to browse or seach queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found. Many providers include a plugin that uses the native API to do non-JMS things like getting queue depths (and other statistics) or finding queue and topic names
JORAM - JORAM incorporates a 100% pure Java implementation of JMS (Java Message Service API released by Sun Microsystem, Inc.). It provides access to a MOM (Message Oriented Middleware), built on top of the ScalAgent agents based distributed platform.
JORAM is an open source software released under the LGPL license.
MantaRay - MantaRay is an open source, fully distributed, enterprise-grade messaging middleware product that was designed to address the dual problems of todays high traffic IT environments their continuously changing structure and the ever growing volume and size of the messages passing through them.
MantaRay combines cutting-edge design concepts messaging system optimization and peer to peer architecture that have enabled the creation of technology that is much more powerful than existing messaging systems in terms of speed, scalability, reliability, affordability, flexibility, ease-of-use and deployment time.
OpenJMS - OpenJMS is an open source implementation of Sun Microsystemss Java Message Service API 1.1 Specification
Features:
Point-to-Point and publish-subscribe messaging models
Guaranteed delivery of messages
Synchronous and asynchronous message delivery
Persistence using JDBC
Local transactions
Message filtering using SQL92-like selectors
Authentication
Administration GUI
XML-based configuration files
In-memory and database garbage collection
Automatic client disconnection detection
Applet support
Integrates with Servlet containers such as Jakarta Tomcat
Support for TCP, RMI, HTTP and SSL protocol stacks
Support for large numbers of destinations and subscribers
Presumo - Presumo is an implementation of the Java Message Service API.
Our goal is to provide an open source Message Oriented Middleware solution based on the JMS API with features not available in other JMS implementations and performance (in terms of message throughput) better, or at least equal to, proprietary solutions.
The overall design is a scalable distributed architecture with an emphasis on the Publish/Subscribe messaging paradigm and server-side content based filtering.
Somnifugi JMS - SomnifugiJMS is an implementation of JMS that works inside a single JVM to send JMS Messages between Threads. Somnifugi is particularly useful for isolating the awt Thread so that the user interface will stay lively, for decoupling calls to slower external resources such as database connections, and for speeding up implementations of generic JMS clients by placing decoupled JMS clients in the same JVM.
UberMQ Open Source JMS - UberMQ is a clean room implementation of the Java Message Service specification. JMS is a part of the Java 2 Enterprise Edition. We wrote UberMQ because many of the established JMS vendors have turned their back on the core tenets of distributed computing: fast and simple.
阿涂 发表于 2006-04-30 14:11 阅读( 1217) 评论( 3) 引用( 0) Java
2006/04/28
闲扯原码、反码、补码(转载)
数值在计算机中表示形式为机器数,计算机只能识别0和1,使用的是二进制,而在日常生活中人们使用的是十进制,"正如亚里士多德早就指出的那样,今天十进制的广泛采用,只不过我们绝大多数人生来具有10个手指头这个解剖学事实的结果.尽管在历史上手指计数(5,10进制)的实践要比二或三进制计数出现的晚."(摘自<<数学发展史>>有空大家可以看看哦~,很有意思的).为了能方便的与二进制转换,就使用了十六进制(2 4)和八进制(23).下面进入正题.
数值有正负之分,计算机就用一个数的最高位存放符号(0为正,1为负).这就是机器数的原码了.假设机器能处理的位数为8.即字长为1byte,原码能表示数值的范围为
(-127~-0 +0~127)共256个.
有了数值的表示方法就可以对数进行算术运算.但是很快就发现用带符号位的原码进行乘除运算时结果正确,而在加减运算的时候就出现了问题,如下: 假设字长为8bits( 1 ) 10- ( 1 )10 = ( 1 )10 + ( -1 )10 = ( 0 )10
(00000001)原 + (10000001)原 = (10000010)原 = ( -2 ) 显然不正确.
因为在两个整数的加法运算中是没有问题的,于是就发现问题出现在带符号位的负数身上,对除符号位外的其余各位逐位取反就产生了反码.反码的取值空间和原码相同且一一对应. 下面是反码的减法运算:
( 1 )10 - ( 1 ) 10= ( 1 ) 10+ ( -1 ) 10= ( 0 )10
(00000001) 反+ (11111110)反 = (11111111)反 = ( -0 ) 有问题.
( 1 )10 - ( 2)10 = ( 1 )10 + ( -2 )10 = ( -1 )10
(00000001) 反+ (11111101)反 = (11111110)反 = ( -1 ) 正确
问题出现在(+0)和(-0)上,在人们的计算概念中零是没有正负之分的.(印度人首先将零作为标记并放入运算之中,包含有零号的印度数学和十进制计数对人类文明的贡献极大).
于是就引入了补码概念. 负数的补码就是对反码加一,而正数不变,正数的原码反码补码是一样的.在补码中用(-128)代替了(-0),所以补码的表示范围为:
(-128~0~127)共256个.
注意:(-128)没有相对应的原码和反码, (-128) = (10000000) 补码的加减运算如下:
( 1 ) 10- ( 1 ) 10= ( 1 )10 + ( -1 )10 = ( 0 )10
(00000001)补 + (11111111)补 = (00000000)补 = ( 0 ) 正确
( 1 ) 10- ( 2) 10= ( 1 )10 + ( -2 )10 = ( -1 )10
(00000001) 补+ (11111110) 补= (11111111)补 = ( -1 ) 正确
所以补码的设计目的是:
⑴使符号位能与有效值部分一起参加运算,从而简化运算规则.⑵使减法运算转换为加法运算,进一步简化计算机中运算器的线路设计所有这些转换都是在计算机的最底层进行的,而在我们使用的汇编、C等其他高级语言中使用的都是原码。看了上面这些大家应该对原码、反码、补码有了新的认识了吧!
原文网址:http://dev.csdn.net/develop/article/17/17680.shtm
Java使 用 补 码 来 表 示 二 进 制 数 ,在 补 码 表 示 中 ,最 高 位 为符号 位 ,正 数 的 符 号 位 为 0,负 数 为 1。 补 码 的 规 定 如 下 :
对 正 数 来 说 ,最 高 位 为 0,其 余 各 位 代 表 数 值 本 身 (以 二 进制表 示 ),如 +42的补 码 为 00101010。
对 负 数 而 言 ,把 该 数 绝 对 值 的 补 码 按 位 取 反 ,然 后 对 整个数 加 1,即 得 该 数的 补 码 。 如 -42的 补 码 为 11010110 (00101010 按位 取 反 11010101 +1=11010110 )
用 补 码 来 表 示 数 ,0的 补 码 是 唯 一 的 ,都 为 00000000。 (而 在原码 ,反 码 表 示中 ,+0和 -0的 表 示 是 不 唯 一 的 ,可 参 见 相 应 的书 籍 )。 而 且 可 以用 111111表 示 -1的 补 码 (这 也 是 补 码 与 原 码和 反 码 的 区 别 )。
阿涂 发表于 2006-04-28 23:12 阅读( 1014) 评论( 2) 引用( 0) Java
Hex Your Bytes to Display(转载)
Have you ever needed to convert a byte array (byte []) into a displayable hex string? The JDK does not provide this capability for byte arrays, only for the wrapper classes.Below is the code which will convert a byte array into a displayable "hex" representation of the string.
Now you can turn
byte b[] = {0xf1, 0x0d, 0x3c, 0x44};into:String s = "F10D3C44"like this:String s = byteArrayToHexString(b);Here's the code:
- provides the same functionality found in Integer.toHexString(), Short.toHexString(), etc...
- Simple to use
- Fast, efficient and accurate
- Tested and proven
/**Stay tuned, I'll present some additional routines which take the "hex" data and format it into a "Hex Dump" format like: 0000: 32 00 00 00 00 49 99 04 13 14 56 20 17 55 2B 3F ____[2 I™V U+?]
* Convert a byte[] array to readable string format. This makes the "hex"readable!
* @return result String buffer in String format
* @param in byte[] buffer to convert to string format
*/
static String byteArrayToHexString(byte in[]) {
byte ch = 0x00;
int i = 0;
if (in == null || in.length <= 0)
return null;
String pseudo[] = {"0", "1", "2","3", "4", "5", "6", "7", "8","9", "A", "B", "C", "D", "E","F"};
StringBuffer out = new StringBuffer(in.length * 2);
while (i < in.length) {
ch = (byte) (in[i] & 0xF0); // Strip offhigh nibble
ch = (byte) (ch >>> 4); // shift the bits down
ch = (byte) (ch & 0x0F); // must do this is high order bit is on!
out.append(pseudo[ (int) ch]); // convert thenibble to a String Character
ch = (byte) (in[i] & 0x0F); // Strip offlow nibble
out.append(pseudo[ (int) ch]); // convert thenibble to a String Character
i++;
}
String rslt = new String(out);
return rslt;
}
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ____[ ]
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ____[ ]
The above example was created using byteArrayToHexString() along with another routine....I also have a hex dump routine which dumps the hex data in "old" mainframe EBCDIC style format where each byte is display one nibble on top of the other.
阿涂 发表于 2006-04-28 23:02 阅读( 1562) 评论( 5) 引用( 5) Java
java support encoding
基本的encoding,在 lib/rt.jar 中就包含的有:
asic Encoding Set (contained in lib/rt.jar)
Supported by java.nio, java.io and java.lang APIs
Canonical Name for java.nio API
Canonical Name for java.io and java.lang API
Description
US-ASCII
ASCII
American Standard Code for Information Interchange
windows-1250
Cp1250
Windows Eastern European
windows-1251
Cp1251
Windows Cyrillic
windows-1252
Cp1252
Windows Latin-1
windows-1253
Cp1253
Windows Greek
windows-1254
Cp1254
Windows Turkish
windows-1257
Cp1257
Windows Baltic
ISO-8859-1
ISO8859_1
ISO 8859-1, Latin Alphabet No. 1
ISO-8859-2
ISO8859_2
Latin Alphabet No. 2
ISO-8859-4
ISO8859_4
Latin Alphabet No. 4
ISO-8859-5
ISO8859_5
Latin/Cyrillic Alphabet
ISO-8859-7
ISO8859_7
Latin/Greek Alphabet
ISO-8859-9
ISO8859_9
Latin Alphabet No. 5
ISO-8859-13
ISO8859_13
Latin Alphabet No. 7
ISO-8859-15
ISO8859_15
Latin Alphabet No. 9
KOI8-R
KOI8_R
KOI8-R, Russian
UTF-8
UTF8
Eight-bit UCS Transformation Format
UTF-16
UTF-16
Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
UTF-16BE
UnicodeBigUnmarked
Sixteen-bit Unicode Transformation Format, big-endian byte order
UTF-16LE
UnicodeLittleUnmarked
Sixteen-bit Unicode Transformation Format, little-endian byte order
Not available
UnicodeBig
Sixteen-bit Unicode Transformation Format, big-endian byte order, with byte-order mark
Not available
UnicodeLittle
Sixteen-bit Unicode Transformation Format, little-endian byte order, with byte-order mark
另外在java扩展包
Extended Encoding Set (contained in lib/charsets.jar)
Supported by java.nio, java.io and java.lang APIs
Canonical Name for java.nio API
Canonical Name for java.io and java.lang API
Description
windows-1255
Cp1255
Windows Hebrew
windows-1256
Cp1256
Windows Arabic
windows-1258
Cp1258
Windows Vietnamese
ISO-8859-3
ISO8859_3
Latin Alphabet No. 3
ISO-8859-6
ISO8859_6
Latin/Arabic Alphabet
ISO-8859-8
ISO8859_8
Latin/Hebrew Alphabet
windows-31j
MS932
Windows Japanese
EUC-JP
EUC_JP
JISX 0201, 0208 and 0212, EUC encoding Japanese
x-EUC-JP-LINUX
EUC_JP_LINUX
JISX 0201, 0208 , EUC encoding Japanese
Shift_JIS
SJIS
Shift-JIS, Japanese
ISO-2022-JP
ISO2022JP
JIS X 0201, 0208, in ISO 2022 form, Japanese
x-mswin-936
MS936
Windows Simplified Chinese
GB18030
GB18030
Simplified Chinese, PRC standard
x-EUC-CN
EUC_CN
GB2312, EUC encoding, Simplified Chinese
GBK
GBK
GBK, Simplified Chinese
ISCII91
ISCII91
ISCII91 encoding of Indic scripts
x-windows-949
MS949
Windows Korean
EUC-KR
EUC_KR
KS C 5601, EUC encoding, Korean
ISO-2022-KR
ISO2022KR
ISO 2022 KR, Korean
x-windows-950
MS950
Windows Traditional Chinese
x-MS950-HKSCS
MS950_HKSCS
Windows Traditional Chinese with Hong Kong extensions
x-EUC-TW
EUC_TW
CNS11643 (Plane 1-3), EUC encoding, Traditional Chinese
Big5
Big5
Big5, Traditional Chinese
Big5-HKSCS
Big5_HKSCS
Big5 with Hong Kong extensions, Traditional Chinese
TIS-620
TIS620
TIS620, Thai
Extended Encoding Set (contained in lib/charsets.jar)
Supported by java.io and java.lang APIs
Canonical Name
Description
Big5_Solaris
Big5 with seven additional Hanzi ideograph character mappings for the Solaris zh_TW.BIG5 locale
Cp037
USA, Canada (Bilingual, French), Netherlands, Portugal, Brazil, Australia
Cp273
IBM Austria, Germany
Cp277
IBM Denmark, Norway
Cp278
IBM Finland, Sweden
Cp280
IBM Italy
Cp284
IBM Catalan/Spain, Spanish Latin America
Cp285
IBM United Kingdom, Ireland
Cp297
IBM France
Cp420
IBM Arabic
Cp424
IBM Hebrew
Cp437
MS-DOS United States, Australia, New Zealand, South Africa
Cp500
EBCDIC 500V1
Cp737
PC Greek
Cp775
PC Baltic
Cp838
IBM Thailand extended SBCS
Cp850
MS-DOS Latin-1
Cp852
MS-DOS Latin-2
Cp855
IBM Cyrillic
Cp856
IBM Hebrew
Cp857
IBM Turkish
Cp858
Variant of Cp850 with Euro character
Cp860
MS-DOS Portuguese
Cp861
MS-DOS Icelandic
Cp862
PC Hebrew
Cp863
MS-DOS Canadian French
Cp864
PC Arabic
Cp865
MS-DOS Nordic
Cp866
MS-DOS Russian
Cp868
MS-DOS Pakistan
Cp869
IBM Modern Greek
Cp870
IBM Multilingual Latin-2
Cp871
IBM Iceland
Cp874
IBM Thai
Cp875
IBM Greek
Cp918
IBM Pakistan (Urdu)
Cp921
IBM Latvia, Lithuania (AIX, DOS)
Cp922
IBM Estonia (AIX, DOS)
Cp930
Japanese Katakana-Kanji mixed with 4370 UDC, superset of 5026
Cp933
Korean Mixed with 1880 UDC, superset of 5029
Cp935
Simplified Chinese Host mixed with 1880 UDC, superset of 5031
Cp937
Traditional Chinese Host miexed with 6204 UDC, superset of 5033
Cp939
Japanese Latin Kanji mixed with 4370 UDC, superset of 5035
Cp942
IBM OS/2 Japanese, superset of Cp932
Cp942C
Variant of Cp942
Cp943
IBM OS/2 Japanese, superset of Cp932 and Shift-JIS
Cp943C
Variant of Cp943
Cp948
OS/2 Chinese (Taiwan) superset of 938
Cp949
PC Korean
Cp949C
Variant of Cp949
Cp950
PC Chinese (Hong Kong, Taiwan)
Cp964
AIX Chinese (Taiwan)
Cp970
AIX Korean
Cp1006
IBM AIX Pakistan (Urdu)
Cp1025
IBM Multilingual Cyrillic: Bulgaria, Bosnia, Herzegovinia, Macedonia (FYR)
Cp1026
IBM Latin-5, Turkey
Cp1046
IBM Arabic - Windows
Cp1047
Latin-1 character set for EBCDIC hosts
Cp1097
IBM Iran (Farsi)/Persian
Cp1098
IBM Iran (Farsi)/Persian (PC)
Cp1112
IBM Latvia, Lithuania
Cp1122
IBM Estonia
Cp1123
IBM Ukraine
Cp1124
IBM AIX Ukraine
Cp1140
Variant of Cp037 with Euro character
Cp1141
Variant of Cp273 with Euro character
Cp1142
Variant of Cp277 with Euro character
Cp1143
Variant of Cp278 with Euro character
Cp1144
Variant of Cp280 with Euro character
Cp1145
Variant of Cp284 with Euro character
Cp1146
Variant of Cp285 with Euro character
Cp1147
Variant of Cp297 with Euro character
Cp1148
Variant of Cp500 with Euro character
Cp1149
Variant of Cp871 with Euro character
Cp1381
IBM OS/2, DOS People's Republic of China (PRC)
Cp1383
IBM AIX People's Republic of China (PRC)
Cp33722
IBM-eucJP - Japanese (superset of 5050)
ISO2022_CN_CNS
CNS11643 in ISO 2022 CN form, Traditional Chinese (conversion from Unicode only)
ISO2022_CN_GB
GB2312 in ISO 2022 CN form, Simplified Chinese (conversion from Unicode only)
JISAutoDetect
Detects and converts from Shift-JIS, EUC-JP, ISO 2022 JP (conversion to Unicode only)
MS874
Windows Thai
MacArabic
Macintosh Arabic
MacCentralEurope
Macintosh Latin-2
MacCroatian
Macintosh Croatian
MacCyrillic
Macintosh Cyrillic
MacDingbat
Macintosh Dingbat
MacGreek
Macintosh Greek
MacHebrew
Macintosh Hebrew
MacIceland
Macintosh Iceland
MacRoman
Macintosh Roman
MacRomania
Macintosh Romania
MacSymbol
Macintosh Symbol
MacThai
Macintosh Thai
MacTurkish
Macintosh Turkish
MacUkraine
Macintosh Ukraine
参见jdk文档:
http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html

