KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > util > EncodingMap


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.util;
18
19 import java.util.Hashtable JavaDoc;
20
21 /**
22  * EncodingMap is a convenience class which handles conversions between
23  * IANA encoding names and Java encoding names, and vice versa. The
24  * encoding names used in XML instance documents <strong>must</strong>
25  * be the IANA encoding names specified or one of the aliases for those names
26  * which IANA defines.
27  * <p>
28  * <TABLE BORDER="0" WIDTH="100%">
29  * <TR>
30  * <TD WIDTH="33%">
31  * <P ALIGN="CENTER"><B>Common Name</B>
32  * </TD>
33  * <TD WIDTH="15%">
34  * <P ALIGN="CENTER"><B>Use this name in XML files</B>
35  * </TD>
36  * <TD WIDTH="12%">
37  * <P ALIGN="CENTER"><B>Name Type</B>
38  * </TD>
39  * <TD WIDTH="31%">
40  * <P ALIGN="CENTER"><B>Xerces converts to this Java Encoder Name</B>
41  * </TD>
42  * </TR>
43  * <TR>
44  * <TD WIDTH="33%">8 bit Unicode</TD>
45  * <TD WIDTH="15%">
46  * <P ALIGN="CENTER">UTF-8
47  * </TD>
48  * <TD WIDTH="12%">
49  * <P ALIGN="CENTER">IANA
50  * </TD>
51  * <TD WIDTH="31%">
52  * <P ALIGN="CENTER">UTF8
53  * </TD>
54  * </TR>
55  * <TR>
56  * <TD WIDTH="33%">ISO Latin 1</TD>
57  * <TD WIDTH="15%">
58  * <P ALIGN="CENTER">ISO-8859-1
59  * </TD>
60  * <TD WIDTH="12%">
61  * <P ALIGN="CENTER">MIME
62  * </TD>
63  * <TD WIDTH="31%">
64  * <P ALIGN="CENTER">ISO-8859-1
65  * </TD>
66  * </TR>
67  * <TR>
68  * <TD WIDTH="33%">ISO Latin 2</TD>
69  * <TD WIDTH="15%">
70  * <P ALIGN="CENTER">ISO-8859-2
71  * </TD>
72  * <TD WIDTH="12%">
73  * <P ALIGN="CENTER">MIME
74  * </TD>
75  * <TD WIDTH="31%">
76  * <P ALIGN="CENTER">ISO-8859-2
77  * </TD>
78  * </TR>
79  * <TR>
80  * <TD WIDTH="33%">ISO Latin 3</TD>
81  * <TD WIDTH="15%">
82  * <P ALIGN="CENTER">ISO-8859-3
83  * </TD>
84  * <TD WIDTH="12%">
85  * <P ALIGN="CENTER">MIME
86  * </TD>
87  * <TD WIDTH="31%">
88  * <P ALIGN="CENTER">ISO-8859-3
89  * </TD>
90  * </TR>
91  * <TR>
92  * <TD WIDTH="33%">ISO Latin 4</TD>
93  * <TD WIDTH="15%">
94  * <P ALIGN="CENTER">ISO-8859-4
95  * </TD>
96  * <TD WIDTH="12%">
97  * <P ALIGN="CENTER">MIME
98  * </TD>
99  * <TD WIDTH="31%">
100  * <P ALIGN="CENTER">ISO-8859-4
101  * </TD>
102  * </TR>
103  * <TR>
104  * <TD WIDTH="33%">ISO Latin Cyrillic</TD>
105  * <TD WIDTH="15%">
106  * <P ALIGN="CENTER">ISO-8859-5
107  * </TD>
108  * <TD WIDTH="12%">
109  * <P ALIGN="CENTER">MIME
110  * </TD>
111  * <TD WIDTH="31%">
112  * <P ALIGN="CENTER">ISO-8859-5
113  * </TD>
114  * </TR>
115  * <TR>
116  * <TD WIDTH="33%">ISO Latin Arabic</TD>
117  * <TD WIDTH="15%">
118  * <P ALIGN="CENTER">ISO-8859-6
119  * </TD>
120  * <TD WIDTH="12%">
121  * <P ALIGN="CENTER">MIME
122  * </TD>
123  * <TD WIDTH="31%">
124  * <P ALIGN="CENTER">ISO-8859-6
125  * </TD>
126  * </TR>
127  * <TR>
128  * <TD WIDTH="33%">ISO Latin Greek</TD>
129  * <TD WIDTH="15%">
130  * <P ALIGN="CENTER">ISO-8859-7
131  * </TD>
132  * <TD WIDTH="12%">
133  * <P ALIGN="CENTER">MIME
134  * </TD>
135  * <TD WIDTH="31%">
136  * <P ALIGN="CENTER">ISO-8859-7
137  * </TD>
138  * </TR>
139  * <TR>
140  * <TD WIDTH="33%">ISO Latin Hebrew</TD>
141  * <TD WIDTH="15%">
142  * <P ALIGN="CENTER">ISO-8859-8
143  * </TD>
144  * <TD WIDTH="12%">
145  * <P ALIGN="CENTER">MIME
146  * </TD>
147  * <TD WIDTH="31%">
148  * <P ALIGN="CENTER">ISO-8859-8
149  * </TD>
150  * </TR>
151  * <TR>
152  * <TD WIDTH="33%">ISO Latin 5</TD>
153  * <TD WIDTH="15%">
154  * <P ALIGN="CENTER">ISO-8859-9
155  * </TD>
156  * <TD WIDTH="12%">
157  * <P ALIGN="CENTER">MIME
158  * </TD>
159  * <TD WIDTH="31%">
160  * <P ALIGN="CENTER">ISO-8859-9
161  * </TD>
162  * </TR>
163  * <TR>
164  * <TD WIDTH="33%">EBCDIC: US</TD>
165  * <TD WIDTH="15%">
166  * <P ALIGN="CENTER">ebcdic-cp-us
167  * </TD>
168  * <TD WIDTH="12%">
169  * <P ALIGN="CENTER">IANA
170  * </TD>
171  * <TD WIDTH="31%">
172  * <P ALIGN="CENTER">cp037
173  * </TD>
174  * </TR>
175  * <TR>
176  * <TD WIDTH="33%">EBCDIC: Canada</TD>
177  * <TD WIDTH="15%">
178  * <P ALIGN="CENTER">ebcdic-cp-ca
179  * </TD>
180  * <TD WIDTH="12%">
181  * <P ALIGN="CENTER">IANA
182  * </TD>
183  * <TD WIDTH="31%">
184  * <P ALIGN="CENTER">cp037
185  * </TD>
186  * </TR>
187  * <TR>
188  * <TD WIDTH="33%">EBCDIC: Netherlands</TD>
189  * <TD WIDTH="15%">
190  * <P ALIGN="CENTER">ebcdic-cp-nl
191  * </TD>
192  * <TD WIDTH="12%">
193  * <P ALIGN="CENTER">IANA
194  * </TD>
195  * <TD WIDTH="31%">
196  * <P ALIGN="CENTER">cp037
197  * </TD>
198  * </TR>
199  * <TR>
200  * <TD WIDTH="33%">EBCDIC: Denmark</TD>
201  * <TD WIDTH="15%">
202  * <P ALIGN="CENTER">ebcdic-cp-dk
203  * </TD>
204  * <TD WIDTH="12%">
205  * <P ALIGN="CENTER">IANA
206  * </TD>
207  * <TD WIDTH="31%">
208  * <P ALIGN="CENTER">cp277
209  * </TD>
210  * </TR>
211  * <TR>
212  * <TD WIDTH="33%">EBCDIC: Norway</TD>
213  * <TD WIDTH="15%">
214  * <P ALIGN="CENTER">ebcdic-cp-no
215  * </TD>
216  * <TD WIDTH="12%">
217  * <P ALIGN="CENTER">IANA
218  * </TD>
219  * <TD WIDTH="31%">
220  * <P ALIGN="CENTER">cp277
221  * </TD>
222  * </TR>
223  * <TR>
224  * <TD WIDTH="33%">EBCDIC: Finland</TD>
225  * <TD WIDTH="15%">
226  * <P ALIGN="CENTER">ebcdic-cp-fi
227  * </TD>
228  * <TD WIDTH="12%">
229  * <P ALIGN="CENTER">IANA
230  * </TD>
231  * <TD WIDTH="31%">
232  * <P ALIGN="CENTER">cp278
233  * </TD>
234  * </TR>
235  * <TR>
236  * <TD WIDTH="33%">EBCDIC: Sweden</TD>
237  * <TD WIDTH="15%">
238  * <P ALIGN="CENTER">ebcdic-cp-se
239  * </TD>
240  * <TD WIDTH="12%">
241  * <P ALIGN="CENTER">IANA
242  * </TD>
243  * <TD WIDTH="31%">
244  * <P ALIGN="CENTER">cp278
245  * </TD>
246  * </TR>
247  * <TR>
248  * <TD WIDTH="33%">EBCDIC: Italy</TD>
249  * <TD WIDTH="15%">
250  * <P ALIGN="CENTER">ebcdic-cp-it
251  * </TD>
252  * <TD WIDTH="12%">
253  * <P ALIGN="CENTER">IANA
254  * </TD>
255  * <TD WIDTH="31%">
256  * <P ALIGN="CENTER">cp280
257  * </TD>
258  * </TR>
259  * <TR>
260  * <TD WIDTH="33%">EBCDIC: Spain, Latin America</TD>
261  * <TD WIDTH="15%">
262  * <P ALIGN="CENTER">ebcdic-cp-es
263  * </TD>
264  * <TD WIDTH="12%">
265  * <P ALIGN="CENTER">IANA
266  * </TD>
267  * <TD WIDTH="31%">
268  * <P ALIGN="CENTER">cp284
269  * </TD>
270  * </TR>
271  * <TR>
272  * <TD WIDTH="33%">EBCDIC: Great Britain</TD>
273  * <TD WIDTH="15%">
274  * <P ALIGN="CENTER">ebcdic-cp-gb
275  * </TD>
276  * <TD WIDTH="12%">
277  * <P ALIGN="CENTER">IANA
278  * </TD>
279  * <TD WIDTH="31%">
280  * <P ALIGN="CENTER">cp285
281  * </TD>
282  * </TR>
283  * <TR>
284  * <TD WIDTH="33%">EBCDIC: France</TD>
285  * <TD WIDTH="15%">
286  * <P ALIGN="CENTER">ebcdic-cp-fr
287  * </TD>
288  * <TD WIDTH="12%">
289  * <P ALIGN="CENTER">IANA
290  * </TD>
291  * <TD WIDTH="31%">
292  * <P ALIGN="CENTER">cp297
293  * </TD>
294  * </TR>
295  * <TR>
296  * <TD WIDTH="33%">EBCDIC: Arabic</TD>
297  * <TD WIDTH="15%">
298  * <P ALIGN="CENTER">ebcdic-cp-ar1
299  * </TD>
300  * <TD WIDTH="12%">
301  * <P ALIGN="CENTER">IANA
302  * </TD>
303  * <TD WIDTH="31%">
304  * <P ALIGN="CENTER">cp420
305  * </TD>
306  * </TR>
307  * <TR>
308  * <TD WIDTH="33%">EBCDIC: Hebrew</TD>
309  * <TD WIDTH="15%">
310  * <P ALIGN="CENTER">ebcdic-cp-he
311  * </TD>
312  * <TD WIDTH="12%">
313  * <P ALIGN="CENTER">IANA
314  * </TD>
315  * <TD WIDTH="31%">
316  * <P ALIGN="CENTER">cp424
317  * </TD>
318  * </TR>
319  * <TR>
320  * <TD WIDTH="33%">EBCDIC: Switzerland</TD>
321  * <TD WIDTH="15%">
322  * <P ALIGN="CENTER">ebcdic-cp-ch
323  * </TD>
324  * <TD WIDTH="12%">
325  * <P ALIGN="CENTER">IANA
326  * </TD>
327  * <TD WIDTH="31%">
328  * <P ALIGN="CENTER">cp500
329  * </TD>
330  * </TR>
331  * <TR>
332  * <TD WIDTH="33%">EBCDIC: Roece</TD>
333  * <TD WIDTH="15%">
334  * <P ALIGN="CENTER">ebcdic-cp-roece
335  * </TD>
336  * <TD WIDTH="12%">
337  * <P ALIGN="CENTER">IANA
338  * </TD>
339  * <TD WIDTH="31%">
340  * <P ALIGN="CENTER">cp870
341  * </TD>
342  * </TR>
343  * <TR>
344  * <TD WIDTH="33%">EBCDIC: Yugoslavia</TD>
345  * <TD WIDTH="15%">
346  * <P ALIGN="CENTER">ebcdic-cp-yu
347  * </TD>
348  * <TD WIDTH="12%">
349  * <P ALIGN="CENTER">IANA
350  * </TD>
351  * <TD WIDTH="31%">
352  * <P ALIGN="CENTER">cp870
353  * </TD>
354  * </TR>
355  * <TR>
356  * <TD WIDTH="33%">EBCDIC: Iceland</TD>
357  * <TD WIDTH="15%">
358  * <P ALIGN="CENTER">ebcdic-cp-is
359  * </TD>
360  * <TD WIDTH="12%">
361  * <P ALIGN="CENTER">IANA
362  * </TD>
363  * <TD WIDTH="31%">
364  * <P ALIGN="CENTER">cp871
365  * </TD>
366  * </TR>
367  * <TR>
368  * <TD WIDTH="33%">EBCDIC: Urdu</TD>
369  * <TD WIDTH="15%">
370  * <P ALIGN="CENTER">ebcdic-cp-ar2
371  * </TD>
372  * <TD WIDTH="12%">
373  * <P ALIGN="CENTER">IANA
374  * </TD>
375  * <TD WIDTH="31%">
376  * <P ALIGN="CENTER">cp918
377  * </TD>
378  * </TR>
379  * <TR>
380  * <TD WIDTH="33%">Chinese for PRC, mixed 1/2 byte</TD>
381  * <TD WIDTH="15%">
382  * <P ALIGN="CENTER">gb2312
383  * </TD>
384  * <TD WIDTH="12%">
385  * <P ALIGN="CENTER">MIME
386  * </TD>
387  * <TD WIDTH="31%">
388  * <P ALIGN="CENTER">GB2312
389  * </TD>
390  * </TR>
391  * <TR>
392  * <TD WIDTH="33%">Extended Unix Code, packed for Japanese</TD>
393  * <TD WIDTH="15%">
394  * <P ALIGN="CENTER">euc-jp
395  * </TD>
396  * <TD WIDTH="12%">
397  * <P ALIGN="CENTER">MIME
398  * </TD>
399  * <TD WIDTH="31%">
400  * <P ALIGN="CENTER">eucjis
401  * </TD>
402  * </TR>
403  * <TR>
404  * <TD WIDTH="33%">Japanese: iso-2022-jp</TD>
405  * <TD WIDTH="15%">
406  * <P ALIGN="CENTER">iso-2020-jp
407  * </TD>
408  * <TD WIDTH="12%">
409  * <P ALIGN="CENTER">MIME
410  * </TD>
411  * <TD WIDTH="31%">
412  * <P ALIGN="CENTER">JIS
413  * </TD>
414  * </TR>
415  * <TR>
416  * <TD WIDTH="33%">Japanese: Shift JIS</TD>
417  * <TD WIDTH="15%">
418  * <P ALIGN="CENTER">Shift_JIS
419  * </TD>
420  * <TD WIDTH="12%">
421  * <P ALIGN="CENTER">MIME
422  * </TD>
423  * <TD WIDTH="31%">
424  * <P ALIGN="CENTER">SJIS
425  * </TD>
426  * </TR>
427  * <TR>
428  * <TD WIDTH="33%">Chinese: Big5</TD>
429  * <TD WIDTH="15%">
430  * <P ALIGN="CENTER">Big5
431  * </TD>
432  * <TD WIDTH="12%">
433  * <P ALIGN="CENTER">MIME
434  * </TD>
435  * <TD WIDTH="31%">
436  * <P ALIGN="CENTER">Big5
437  * </TD>
438  * </TR>
439  * <TR>
440  * <TD WIDTH="33%">Extended Unix Code, packed for Korean</TD>
441  * <TD WIDTH="15%">
442  * <P ALIGN="CENTER">euc-kr
443  * </TD>
444  * <TD WIDTH="12%">
445  * <P ALIGN="CENTER">MIME
446  * </TD>
447  * <TD WIDTH="31%">
448  * <P ALIGN="CENTER">iso2022kr
449  * </TD>
450  * </TR>
451  * <TR>
452  * <TD WIDTH="33%">Cyrillic</TD>
453  * <TD WIDTH="15%">
454  * <P ALIGN="CENTER">koi8-r
455  * </TD>
456  * <TD WIDTH="12%">
457  * <P ALIGN="CENTER">MIME
458  * </TD>
459  * <TD WIDTH="31%">
460  * <P ALIGN="CENTER">koi8-r
461  * </TD>
462  * </TR>
463  * </TABLE>
464  *
465  * @author TAMURA Kent, IBM
466  * @author Andy Clark, IBM
467  *
468  * @version $Id: EncodingMap.java,v 1.21 2005/05/24 03:49:40 mrglavas Exp $
469  */

470 public class EncodingMap {
471
472     //
473
// Data
474
//
475

476     /** fIANA2JavaMap */
477     protected final static Hashtable JavaDoc fIANA2JavaMap = new Hashtable JavaDoc();
478
479     /** fJava2IANAMap */
480     protected final static Hashtable JavaDoc fJava2IANAMap = new Hashtable JavaDoc();
481
482     //
483
// Static initialization
484
//
485

486     static {
487
488         // add IANA to Java encoding mappings.
489
fIANA2JavaMap.put("BIG5", "Big5");
490         fIANA2JavaMap.put("CSBIG5", "Big5");
491         fIANA2JavaMap.put("CP037", "CP037");
492         fIANA2JavaMap.put("IBM037", "CP037");
493         fIANA2JavaMap.put("CSIBM037", "CP037");
494         fIANA2JavaMap.put("EBCDIC-CP-US", "CP037");
495         fIANA2JavaMap.put("EBCDIC-CP-CA", "CP037");
496         fIANA2JavaMap.put("EBCDIC-CP-NL", "CP037");
497         fIANA2JavaMap.put("EBCDIC-CP-WT", "CP037");
498         fIANA2JavaMap.put("IBM273", "CP273");
499         fIANA2JavaMap.put("CP273", "CP273");
500         fIANA2JavaMap.put("CSIBM273", "CP273");
501         fIANA2JavaMap.put("IBM277", "CP277");
502         fIANA2JavaMap.put("CP277", "CP277");
503         fIANA2JavaMap.put("CSIBM277", "CP277");
504         fIANA2JavaMap.put("EBCDIC-CP-DK", "CP277");
505         fIANA2JavaMap.put("EBCDIC-CP-NO", "CP277");
506         fIANA2JavaMap.put("IBM278", "CP278");
507         fIANA2JavaMap.put("CP278", "CP278");
508         fIANA2JavaMap.put("CSIBM278", "CP278");
509         fIANA2JavaMap.put("EBCDIC-CP-FI", "CP278");
510         fIANA2JavaMap.put("EBCDIC-CP-SE", "CP278");
511         fIANA2JavaMap.put("IBM280", "CP280");
512         fIANA2JavaMap.put("CP280", "CP280");
513         fIANA2JavaMap.put("CSIBM280", "CP280");
514         fIANA2JavaMap.put("EBCDIC-CP-IT", "CP280");
515         fIANA2JavaMap.put("IBM284", "CP284");
516         fIANA2JavaMap.put("CP284", "CP284");
517         fIANA2JavaMap.put("CSIBM284", "CP284");
518         fIANA2JavaMap.put("EBCDIC-CP-ES", "CP284");
519         fIANA2JavaMap.put("EBCDIC-CP-GB", "CP285");
520         fIANA2JavaMap.put("IBM285", "CP285");
521         fIANA2JavaMap.put("CP285", "CP285");
522         fIANA2JavaMap.put("CSIBM285", "CP285");
523         fIANA2JavaMap.put("EBCDIC-JP-KANA", "CP290");
524         fIANA2JavaMap.put("IBM290", "CP290");
525         fIANA2JavaMap.put("CP290", "CP290");
526         fIANA2JavaMap.put("CSIBM290", "CP290");
527         fIANA2JavaMap.put("EBCDIC-CP-FR", "CP297");
528         fIANA2JavaMap.put("IBM297", "CP297");
529         fIANA2JavaMap.put("CP297", "CP297");
530         fIANA2JavaMap.put("CSIBM297", "CP297");
531         fIANA2JavaMap.put("EBCDIC-CP-AR1", "CP420");
532         fIANA2JavaMap.put("IBM420", "CP420");
533         fIANA2JavaMap.put("CP420", "CP420");
534         fIANA2JavaMap.put("CSIBM420", "CP420");
535         fIANA2JavaMap.put("EBCDIC-CP-HE", "CP424");
536         fIANA2JavaMap.put("IBM424", "CP424");
537         fIANA2JavaMap.put("CP424", "CP424");
538         fIANA2JavaMap.put("CSIBM424", "CP424");
539         fIANA2JavaMap.put("IBM437", "CP437");
540         fIANA2JavaMap.put("437", "CP437");
541         fIANA2JavaMap.put("CP437", "CP437");
542         fIANA2JavaMap.put("CSPC8CODEPAGE437", "CP437");
543         fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500");
544         fIANA2JavaMap.put("IBM500", "CP500");
545         fIANA2JavaMap.put("CP500", "CP500");
546         fIANA2JavaMap.put("CSIBM500", "CP500");
547         fIANA2JavaMap.put("EBCDIC-CP-CH", "CP500");
548         fIANA2JavaMap.put("EBCDIC-CP-BE", "CP500");
549         fIANA2JavaMap.put("IBM775", "CP775");
550         fIANA2JavaMap.put("CP775", "CP775");
551         fIANA2JavaMap.put("CSPC775BALTIC", "CP775");
552         fIANA2JavaMap.put("IBM850", "CP850");
553         fIANA2JavaMap.put("850", "CP850");
554         fIANA2JavaMap.put("CP850", "CP850");
555         fIANA2JavaMap.put("CSPC850MULTILINGUAL", "CP850");
556         fIANA2JavaMap.put("IBM852", "CP852");
557         fIANA2JavaMap.put("852", "CP852");
558         fIANA2JavaMap.put("CP852", "CP852");
559         fIANA2JavaMap.put("CSPCP852", "CP852");
560         fIANA2JavaMap.put("IBM855", "CP855");
561         fIANA2JavaMap.put("855", "CP855");
562         fIANA2JavaMap.put("CP855", "CP855");
563         fIANA2JavaMap.put("CSIBM855", "CP855");
564         fIANA2JavaMap.put("IBM857", "CP857");
565         fIANA2JavaMap.put("857", "CP857");
566         fIANA2JavaMap.put("CP857", "CP857");
567         fIANA2JavaMap.put("CSIBM857", "CP857");
568         fIANA2JavaMap.put("IBM00858", "CP858");
569         fIANA2JavaMap.put("CP00858", "CP858");
570         fIANA2JavaMap.put("CCSID00858", "CP858");
571         fIANA2JavaMap.put("IBM860", "CP860");
572         fIANA2JavaMap.put("860", "CP860");
573         fIANA2JavaMap.put("CP860", "CP860");
574         fIANA2JavaMap.put("CSIBM860", "CP860");
575         fIANA2JavaMap.put("IBM861", "CP861");
576         fIANA2JavaMap.put("861", "CP861");
577         fIANA2JavaMap.put("CP861", "CP861");
578         fIANA2JavaMap.put("CP-IS", "CP861");
579         fIANA2JavaMap.put("CSIBM861", "CP861");
580         fIANA2JavaMap.put("IBM862", "CP862");
581         fIANA2JavaMap.put("862", "CP862");
582         fIANA2JavaMap.put("CP862", "CP862");
583         fIANA2JavaMap.put("CSPC862LATINHEBREW", "CP862");
584         fIANA2JavaMap.put("IBM863", "CP863");
585         fIANA2JavaMap.put("863", "CP863");
586         fIANA2JavaMap.put("CP863", "CP863");
587         fIANA2JavaMap.put("CSIBM863", "CP863");
588         fIANA2JavaMap.put("IBM864", "CP864");
589         fIANA2JavaMap.put("CP864", "CP864");
590         fIANA2JavaMap.put("CSIBM864", "CP864");
591         fIANA2JavaMap.put("IBM865", "CP865");
592         fIANA2JavaMap.put("865", "CP865");
593         fIANA2JavaMap.put("CP865", "CP865");
594         fIANA2JavaMap.put("CSIBM865", "CP865");
595         fIANA2JavaMap.put("IBM866", "CP866");
596         fIANA2JavaMap.put("866", "CP866");
597         fIANA2JavaMap.put("CP866", "CP866");
598         fIANA2JavaMap.put("CSIBM866", "CP866");
599         fIANA2JavaMap.put("IBM868", "CP868");
600         fIANA2JavaMap.put("CP868", "CP868");
601         fIANA2JavaMap.put("CSIBM868", "CP868");
602         fIANA2JavaMap.put("CP-AR", "CP868");
603         fIANA2JavaMap.put("IBM869", "CP869");
604         fIANA2JavaMap.put("CP869", "CP869");
605         fIANA2JavaMap.put("CSIBM869", "CP869");
606         fIANA2JavaMap.put("CP-GR", "CP869");
607         fIANA2JavaMap.put("IBM870", "CP870");
608         fIANA2JavaMap.put("CP870", "CP870");
609         fIANA2JavaMap.put("CSIBM870", "CP870");
610         fIANA2JavaMap.put("EBCDIC-CP-ROECE", "CP870");
611         fIANA2JavaMap.put("EBCDIC-CP-YU", "CP870");
612         fIANA2JavaMap.put("IBM871", "CP871");
613         fIANA2JavaMap.put("CP871", "CP871");
614         fIANA2JavaMap.put("CSIBM871", "CP871");
615         fIANA2JavaMap.put("EBCDIC-CP-IS", "CP871");
616         fIANA2JavaMap.put("IBM918", "CP918");
617         fIANA2JavaMap.put("CP918", "CP918");
618         fIANA2JavaMap.put("CSIBM918", "CP918");
619         fIANA2JavaMap.put("EBCDIC-CP-AR2", "CP918");
620         fIANA2JavaMap.put("IBM00924", "CP924");
621         fIANA2JavaMap.put("CP00924", "CP924");
622         fIANA2JavaMap.put("CCSID00924", "CP924");
623         // is this an error???
624
fIANA2JavaMap.put("EBCDIC-LATIN9--EURO", "CP924");
625         fIANA2JavaMap.put("IBM1026", "CP1026");
626         fIANA2JavaMap.put("CP1026", "CP1026");
627         fIANA2JavaMap.put("CSIBM1026", "CP1026");
628         fIANA2JavaMap.put("IBM01140", "Cp1140");
629         fIANA2JavaMap.put("CP01140", "Cp1140");
630         fIANA2JavaMap.put("CCSID01140", "Cp1140");
631         fIANA2JavaMap.put("IBM01141", "Cp1141");
632         fIANA2JavaMap.put("CP01141", "Cp1141");
633         fIANA2JavaMap.put("CCSID01141", "Cp1141");
634         fIANA2JavaMap.put("IBM01142", "Cp1142");
635         fIANA2JavaMap.put("CP01142", "Cp1142");
636         fIANA2JavaMap.put("CCSID01142", "Cp1142");
637         fIANA2JavaMap.put("IBM01143", "Cp1143");
638         fIANA2JavaMap.put("CP01143", "Cp1143");
639         fIANA2JavaMap.put("CCSID01143", "Cp1143");
640         fIANA2JavaMap.put("IBM01144", "Cp1144");
641         fIANA2JavaMap.put("CP01144", "Cp1144");
642         fIANA2JavaMap.put("CCSID01144", "Cp1144");
643         fIANA2JavaMap.put("IBM01145", "Cp1145");
644         fIANA2JavaMap.put("CP01145", "Cp1145");
645         fIANA2JavaMap.put("CCSID01145", "Cp1145");
646         fIANA2JavaMap.put("IBM01146", "Cp1146");
647         fIANA2JavaMap.put("CP01146", "Cp1146");
648         fIANA2JavaMap.put("CCSID01146", "Cp1146");
649         fIANA2JavaMap.put("IBM01147", "Cp1147");
650         fIANA2JavaMap.put("CP01147", "Cp1147");
651         fIANA2JavaMap.put("CCSID01147", "Cp1147");
652         fIANA2JavaMap.put("IBM01148", "Cp1148");
653         fIANA2JavaMap.put("CP01148", "Cp1148");
654         fIANA2JavaMap.put("CCSID01148", "Cp1148");
655         fIANA2JavaMap.put("IBM01149", "Cp1149");
656         fIANA2JavaMap.put("CP01149", "Cp1149");
657         fIANA2JavaMap.put("CCSID01149", "Cp1149");
658         fIANA2JavaMap.put("EUC-JP", "EUCJIS");
659         fIANA2JavaMap.put("CSEUCPKDFMTJAPANESE", "EUCJIS");
660         fIANA2JavaMap.put("EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE", "EUCJIS");
661         fIANA2JavaMap.put("EUC-KR", "KSC5601");
662         fIANA2JavaMap.put("CSEUCKR", "KSC5601");
663         fIANA2JavaMap.put("KS_C_5601-1987", "KS_C_5601-1987");
664         fIANA2JavaMap.put("ISO-IR-149", "KS_C_5601-1987");
665         fIANA2JavaMap.put("KS_C_5601-1989", "KS_C_5601-1987");
666         fIANA2JavaMap.put("KSC_5601", "KS_C_5601-1987");
667         fIANA2JavaMap.put("KOREAN", "KS_C_5601-1987");
668         fIANA2JavaMap.put("CSKSC56011987", "KS_C_5601-1987");
669         fIANA2JavaMap.put("GB2312", "GB2312");
670         fIANA2JavaMap.put("CSGB2312", "GB2312");
671         fIANA2JavaMap.put("ISO-2022-JP", "JIS");
672         fIANA2JavaMap.put("CSISO2022JP", "JIS");
673         fIANA2JavaMap.put("ISO-2022-KR", "ISO2022KR");
674         fIANA2JavaMap.put("CSISO2022KR", "ISO2022KR");
675         fIANA2JavaMap.put("ISO-2022-CN", "ISO2022CN");
676
677         fIANA2JavaMap.put("X0201", "JIS0201");
678         fIANA2JavaMap.put("CSISO13JISC6220JP", "JIS0201");
679         fIANA2JavaMap.put("X0208", "JIS0208");
680         fIANA2JavaMap.put("ISO-IR-87", "JIS0208");
681         fIANA2JavaMap.put("X0208dbiJIS_X0208-1983", "JIS0208");
682         fIANA2JavaMap.put("CSISO87JISX0208", "JIS0208");
683         fIANA2JavaMap.put("X0212", "JIS0212");
684         fIANA2JavaMap.put("ISO-IR-159", "JIS0212");
685         fIANA2JavaMap.put("CSISO159JISX02121990", "JIS0212");
686         fIANA2JavaMap.put("GB18030", "GB18030");
687         fIANA2JavaMap.put("GBK", "GBK");
688         fIANA2JavaMap.put("CP936", "GBK");
689         fIANA2JavaMap.put("MS936", "GBK");
690         fIANA2JavaMap.put("WINDOWS-936", "GBK");
691         fIANA2JavaMap.put("SHIFT_JIS", "SJIS");
692         fIANA2JavaMap.put("CSSHIFTJIS", "SJIS");
693         fIANA2JavaMap.put("MS_KANJI", "SJIS");
694         fIANA2JavaMap.put("WINDOWS-31J", "MS932");
695         fIANA2JavaMap.put("CSWINDOWS31J", "MS932");
696
697         // Add support for Cp1252 and its friends
698
fIANA2JavaMap.put("WINDOWS-1250", "Cp1250");
699         fIANA2JavaMap.put("WINDOWS-1251", "Cp1251");
700         fIANA2JavaMap.put("WINDOWS-1252", "Cp1252");
701         fIANA2JavaMap.put("WINDOWS-1253", "Cp1253");
702         fIANA2JavaMap.put("WINDOWS-1254", "Cp1254");
703         fIANA2JavaMap.put("WINDOWS-1255", "Cp1255");
704         fIANA2JavaMap.put("WINDOWS-1256", "Cp1256");
705         fIANA2JavaMap.put("WINDOWS-1257", "Cp1257");
706         fIANA2JavaMap.put("WINDOWS-1258", "Cp1258");
707         fIANA2JavaMap.put("TIS-620", "TIS620");
708
709         fIANA2JavaMap.put("ISO-8859-1", "ISO8859_1");
710         fIANA2JavaMap.put("ISO-IR-100", "ISO8859_1");
711         fIANA2JavaMap.put("ISO_8859-1", "ISO8859_1");
712         fIANA2JavaMap.put("LATIN1", "ISO8859_1");
713         fIANA2JavaMap.put("CSISOLATIN1", "ISO8859_1");
714         fIANA2JavaMap.put("L1", "ISO8859_1");
715         fIANA2JavaMap.put("IBM819", "ISO8859_1");
716         fIANA2JavaMap.put("CP819", "ISO8859_1");
717
718         fIANA2JavaMap.put("ISO-8859-2", "ISO8859_2");
719         fIANA2JavaMap.put("ISO-IR-101", "ISO8859_2");
720         fIANA2JavaMap.put("ISO_8859-2", "ISO8859_2");
721         fIANA2JavaMap.put("LATIN2", "ISO8859_2");
722         fIANA2JavaMap.put("CSISOLATIN2", "ISO8859_2");
723         fIANA2JavaMap.put("L2", "ISO8859_2");
724
725         fIANA2JavaMap.put("ISO-8859-3", "ISO8859_3");
726         fIANA2JavaMap.put("ISO-IR-109", "ISO8859_3");
727         fIANA2JavaMap.put("ISO_8859-3", "ISO8859_3");
728         fIANA2JavaMap.put("LATIN3", "ISO8859_3");
729         fIANA2JavaMap.put("CSISOLATIN3", "ISO8859_3");
730         fIANA2JavaMap.put("L3", "ISO8859_3");
731
732         fIANA2JavaMap.put("ISO-8859-4", "ISO8859_4");
733         fIANA2JavaMap.put("ISO-IR-110", "ISO8859_4");
734         fIANA2JavaMap.put("ISO_8859-4", "ISO8859_4");
735         fIANA2JavaMap.put("LATIN4", "ISO8859_4");
736         fIANA2JavaMap.put("CSISOLATIN4", "ISO8859_4");
737         fIANA2JavaMap.put("L4", "ISO8859_4");
738
739         fIANA2JavaMap.put("ISO-8859-5", "ISO8859_5");
740         fIANA2JavaMap.put("ISO-IR-144", "ISO8859_5");
741         fIANA2JavaMap.put("ISO_8859-5", "ISO8859_5");
742         fIANA2JavaMap.put("CYRILLIC", "ISO8859_5");
743         fIANA2JavaMap.put("CSISOLATINCYRILLIC", "ISO8859_5");
744
745         fIANA2JavaMap.put("ISO-8859-6", "ISO8859_6");
746         fIANA2JavaMap.put("ISO-IR-127", "ISO8859_6");
747         fIANA2JavaMap.put("ISO_8859-6", "ISO8859_6");
748         fIANA2JavaMap.put("ECMA-114", "ISO8859_6");
749         fIANA2JavaMap.put("ASMO-708", "ISO8859_6");
750         fIANA2JavaMap.put("ARABIC", "ISO8859_6");
751         fIANA2JavaMap.put("CSISOLATINARABIC", "ISO8859_6");
752
753         fIANA2JavaMap.put("ISO-8859-7", "ISO8859_7");
754         fIANA2JavaMap.put("ISO-IR-126", "ISO8859_7");
755         fIANA2JavaMap.put("ISO_8859-7", "ISO8859_7");
756         fIANA2JavaMap.put("ELOT_928", "ISO8859_7");
757         fIANA2JavaMap.put("ECMA-118", "ISO8859_7");
758         fIANA2JavaMap.put("GREEK", "ISO8859_7");
759         fIANA2JavaMap.put("CSISOLATINGREEK", "ISO8859_7");
760         fIANA2JavaMap.put("GREEK8", "ISO8859_7");
761
762         fIANA2JavaMap.put("ISO-8859-8", "ISO8859_8");
763         fIANA2JavaMap.put("ISO-8859-8-I", "ISO8859_8"); // added since this encoding only differs w.r.t. presentation
764
fIANA2JavaMap.put("ISO-IR-138", "ISO8859_8");
765         fIANA2JavaMap.put("ISO_8859-8", "ISO8859_8");
766         fIANA2JavaMap.put("HEBREW", "ISO8859_8");
767         fIANA2JavaMap.put("CSISOLATINHEBREW", "ISO8859_8");
768
769         fIANA2JavaMap.put("ISO-8859-9", "ISO8859_9");
770         fIANA2JavaMap.put("ISO-IR-148", "ISO8859_9");
771         fIANA2JavaMap.put("ISO_8859-9", "ISO8859_9");
772         fIANA2JavaMap.put("LATIN5", "ISO8859_9");
773         fIANA2JavaMap.put("CSISOLATIN5", "ISO8859_9");
774         fIANA2JavaMap.put("L5", "ISO8859_9");
775
776         fIANA2JavaMap.put("ISO-8859-13", "ISO8859_13");
777         
778         fIANA2JavaMap.put("ISO-8859-15", "ISO8859_15_FDIS");
779         fIANA2JavaMap.put("ISO_8859-15", "ISO8859_15_FDIS");
780         fIANA2JavaMap.put("LATIN-9", "ISO8859_15_FDIS");
781
782         fIANA2JavaMap.put("KOI8-R", "KOI8_R");
783         fIANA2JavaMap.put("CSKOI8R", "KOI8_R");
784         fIANA2JavaMap.put("US-ASCII", "ASCII");
785         fIANA2JavaMap.put("ISO-IR-6", "ASCII");
786         fIANA2JavaMap.put("ANSI_X3.4-1968", "ASCII");
787         fIANA2JavaMap.put("ANSI_X3.4-1986", "ASCII");
788         fIANA2JavaMap.put("ISO_646.IRV:1991", "ASCII");
789         fIANA2JavaMap.put("ASCII", "ASCII");
790         fIANA2JavaMap.put("CSASCII", "ASCII");
791         fIANA2JavaMap.put("ISO646-US", "ASCII");
792         fIANA2JavaMap.put("US", "ASCII");
793         fIANA2JavaMap.put("IBM367", "ASCII");
794         fIANA2JavaMap.put("CP367", "ASCII");
795         fIANA2JavaMap.put("UTF-8", "UTF8");
796         fIANA2JavaMap.put("UTF-16", "UTF-16");
797         fIANA2JavaMap.put("UTF-16BE", "UnicodeBig");
798         fIANA2JavaMap.put("UTF-16LE", "UnicodeLittle");
799
800         // support for 1047, as proposed to be added to the
801
// IANA registry in
802
// http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0049.html
803
fIANA2JavaMap.put("IBM-1047", "Cp1047");
804         fIANA2JavaMap.put("IBM1047", "Cp1047");
805         fIANA2JavaMap.put("CP1047", "Cp1047");
806
807         // Adding new aliases as proposed in
808
// http://lists.w3.org/Archives/Public/ietf-charset/2002JulSep/0058.html
809
fIANA2JavaMap.put("IBM-37", "CP037");
810         fIANA2JavaMap.put("IBM-273", "CP273");
811         fIANA2JavaMap.put("IBM-277", "CP277");
812         fIANA2JavaMap.put("IBM-278", "CP278");
813         fIANA2JavaMap.put("IBM-280", "CP280");
814         fIANA2JavaMap.put("IBM-284", "CP284");
815         fIANA2JavaMap.put("IBM-285", "CP285");
816         fIANA2JavaMap.put("IBM-290", "CP290");
817         fIANA2JavaMap.put("IBM-297", "CP297");
818         fIANA2JavaMap.put("IBM-420", "CP420");
819         fIANA2JavaMap.put("IBM-424", "CP424");
820         fIANA2JavaMap.put("IBM-437", "CP437");
821         fIANA2JavaMap.put("IBM-500", "CP500");
822         fIANA2JavaMap.put("IBM-775", "CP775");
823         fIANA2JavaMap.put("IBM-850", "CP850");
824         fIANA2JavaMap.put("IBM-852", "CP852");
825         fIANA2JavaMap.put("IBM-855", "CP855");
826         fIANA2JavaMap.put("IBM-857", "CP857");
827         fIANA2JavaMap.put("IBM-858", "CP858");
828         fIANA2JavaMap.put("IBM-860", "CP860");
829         fIANA2JavaMap.put("IBM-861", "CP861");
830         fIANA2JavaMap.put("IBM-862", "CP862");
831         fIANA2JavaMap.put("IBM-863", "CP863");
832         fIANA2JavaMap.put("IBM-864", "CP864");
833         fIANA2JavaMap.put("IBM-865", "CP865");
834         fIANA2JavaMap.put("IBM-866", "CP866");
835         fIANA2JavaMap.put("IBM-868", "CP868");
836         fIANA2JavaMap.put("IBM-869", "CP869");
837         fIANA2JavaMap.put("IBM-870", "CP870");
838         fIANA2JavaMap.put("IBM-871", "CP871");
839         fIANA2JavaMap.put("IBM-918", "CP918");
840         fIANA2JavaMap.put("IBM-924", "CP924");
841         fIANA2JavaMap.put("IBM-1026", "CP1026");
842         fIANA2JavaMap.put("IBM-1140", "Cp1140");
843         fIANA2JavaMap.put("IBM-1141", "Cp1141");
844         fIANA2JavaMap.put("IBM-1142", "Cp1142");
845         fIANA2JavaMap.put("IBM-1143", "Cp1143");
846         fIANA2JavaMap.put("IBM-1144", "Cp1144");
847         fIANA2JavaMap.put("IBM-1145", "Cp1145");
848         fIANA2JavaMap.put("IBM-1146", "Cp1146");
849         fIANA2JavaMap.put("IBM-1147", "Cp1147");
850         fIANA2JavaMap.put("IBM-1148", "Cp1148");
851         fIANA2JavaMap.put("IBM-1149", "Cp1149");
852         fIANA2JavaMap.put("IBM-819", "ISO8859_1");
853         fIANA2JavaMap.put("IBM-367", "ASCII");
854
855         // REVISIT:
856
// j:CNS11643 -> EUC-TW?
857
// ISO-2022-CN? ISO-2022-CN-EXT?
858

859         // add Java to IANA encoding mappings
860
//fJava2IANAMap.put("8859_1", "US-ASCII"); // ?
861
fJava2IANAMap.put("ISO8859_1", "ISO-8859-1");
862         fJava2IANAMap.put("ISO8859_2", "ISO-8859-2");
863         fJava2IANAMap.put("ISO8859_3", "ISO-8859-3");
864         fJava2IANAMap.put("ISO8859_4", "ISO-8859-4");
865         fJava2IANAMap.put("ISO8859_5", "ISO-8859-5");
866         fJava2IANAMap.put("ISO8859_6", "ISO-8859-6");
867         fJava2IANAMap.put("ISO8859_7", "ISO-8859-7");
868         fJava2IANAMap.put("ISO8859_8", "ISO-8859-8");
869         fJava2IANAMap.put("ISO8859_9", "ISO-8859-9");
870         fJava2IANAMap.put("ISO8859_13", "ISO-8859-13");
871         fJava2IANAMap.put("ISO8859_15", "ISO-8859-15");
872         fJava2IANAMap.put("ISO8859_15_FDIS", "ISO-8859-15");
873         fJava2IANAMap.put("Big5", "BIG5");
874         fJava2IANAMap.put("CP037", "EBCDIC-CP-US");
875         fJava2IANAMap.put("CP273", "IBM273");
876         fJava2IANAMap.put("CP277", "EBCDIC-CP-DK");
877         fJava2IANAMap.put("CP278", "EBCDIC-CP-FI");
878         fJava2IANAMap.put("CP280", "EBCDIC-CP-IT");
879         fJava2IANAMap.put("CP284", "EBCDIC-CP-ES");
880         fJava2IANAMap.put("CP285", "EBCDIC-CP-GB");
881         fJava2IANAMap.put("CP290", "EBCDIC-JP-KANA");
882         fJava2IANAMap.put("CP297", "EBCDIC-CP-FR");
883         fJava2IANAMap.put("CP420", "EBCDIC-CP-AR1");
884         fJava2IANAMap.put("CP424", "EBCDIC-CP-HE");
885         fJava2IANAMap.put("CP437", "IBM437");
886         fJava2IANAMap.put("CP500", "EBCDIC-CP-CH");
887         fJava2IANAMap.put("CP775", "IBM775");
888         fJava2IANAMap.put("CP850", "IBM850");
889         fJava2IANAMap.put("CP852", "IBM852");
890         fJava2IANAMap.put("CP855", "IBM855");
891         fJava2IANAMap.put("CP857", "IBM857");
892         fJava2IANAMap.put("CP858", "IBM00858");
893         fJava2IANAMap.put("CP860", "IBM860");
894         fJava2IANAMap.put("CP861", "IBM861");
895         fJava2IANAMap.put("CP862", "IBM862");
896         fJava2IANAMap.put("CP863", "IBM863");
897         fJava2IANAMap.put("CP864", "IBM864");
898         fJava2IANAMap.put("CP865", "IBM865");
899         fJava2IANAMap.put("CP866", "IBM866");
900         fJava2IANAMap.put("CP868", "IBM868");
901         fJava2IANAMap.put("CP869", "IBM869");
902         fJava2IANAMap.put("CP870", "EBCDIC-CP-ROECE");
903         fJava2IANAMap.put("CP871", "EBCDIC-CP-IS");
904         fJava2IANAMap.put("CP918", "EBCDIC-CP-AR2");
905         fJava2IANAMap.put("CP924", "IBM00924");
906         fJava2IANAMap.put("CP1026", "IBM1026");
907         fJava2IANAMap.put("Cp01140", "IBM01140");
908         fJava2IANAMap.put("Cp01141", "IBM01141");
909         fJava2IANAMap.put("Cp01142", "IBM01142");
910         fJava2IANAMap.put("Cp01143", "IBM01143");
911         fJava2IANAMap.put("Cp01144", "IBM01144");
912         fJava2IANAMap.put("Cp01145", "IBM01145");
913         fJava2IANAMap.put("Cp01146", "IBM01146");
914         fJava2IANAMap.put("Cp01147", "IBM01147");
915         fJava2IANAMap.put("Cp01148", "IBM01148");
916         fJava2IANAMap.put("Cp01149", "IBM01149");
917         fJava2IANAMap.put("EUCJIS", "EUC-JP");
918         fJava2IANAMap.put("KS_C_5601-1987", "KS_C_5601-1987");
919         fJava2IANAMap.put("GB2312", "GB2312");
920         fJava2IANAMap.put("ISO2022KR", "ISO-2022-KR");
921         fJava2IANAMap.put("ISO2022CN", "ISO-2022-CN");
922         fJava2IANAMap.put("JIS", "ISO-2022-JP");
923         fJava2IANAMap.put("KOI8_R", "KOI8-R");
924         fJava2IANAMap.put("KSC5601", "EUC-KR");
925         fJava2IANAMap.put("GB18030", "GB18030");
926         fJava2IANAMap.put("GBK", "GBK");
927         fJava2IANAMap.put("SJIS", "SHIFT_JIS");
928         fJava2IANAMap.put("MS932", "WINDOWS-31J");
929         fJava2IANAMap.put("UTF8", "UTF-8");
930         fJava2IANAMap.put("Unicode", "UTF-16");
931         fJava2IANAMap.put("UnicodeBig", "UTF-16BE");
932         fJava2IANAMap.put("UnicodeLittle", "UTF-16LE");
933         fJava2IANAMap.put("JIS0201", "X0201");
934         fJava2IANAMap.put("JIS0208", "X0208");
935         fJava2IANAMap.put("JIS0212", "ISO-IR-159");
936
937         // proposed addition (see above for details):
938
fJava2IANAMap.put("CP1047", "IBM1047");
939
940     } // <clinit>()
941

942     //
943
// Constructors
944
//
945

946     /** Default constructor. */
947     public EncodingMap() {}
948
949     //
950
// Public static methods
951
//
952

953     /**
954      * Adds an IANA to Java encoding name mapping.
955      *
956      * @param ianaEncoding The IANA encoding name.
957      * @param javaEncoding The Java encoding name.
958      *
959      * @deprecated Use of this method is not recommended. Its
960      * effect is JVM wide and may cause unforeseen behaviour
961      * for other applications running in the system.
962      */

963     public static void putIANA2JavaMapping(String JavaDoc ianaEncoding,
964                                            String JavaDoc javaEncoding) {
965         fIANA2JavaMap.put(ianaEncoding, javaEncoding);
966     } // putIANA2JavaMapping(String,String)
967

968     /**
969      * Returns the Java encoding name for the specified IANA encoding name.
970      *
971      * @param ianaEncoding The IANA encoding name.
972      */

973     public static String JavaDoc getIANA2JavaMapping(String JavaDoc ianaEncoding) {
974         return (String JavaDoc)fIANA2JavaMap.get(ianaEncoding);
975     } // getIANA2JavaMapping(String):String
976

977     /**
978      * Removes an IANA to Java encoding name mapping.
979      *
980      * @param ianaEncoding The IANA encoding name.
981      *
982      * @deprecated Use of this method is not recommended. Its
983      * effect is JVM wide and may cause unforeseen behaviour
984      * for other applications running in the system.
985      */

986     public static String JavaDoc removeIANA2JavaMapping(String JavaDoc ianaEncoding) {
987         return (String JavaDoc)fIANA2JavaMap.remove(ianaEncoding);
988     } // removeIANA2JavaMapping(String):String
989

990     /**
991      * Adds a Java to IANA encoding name mapping.
992      *
993      * @param javaEncoding The Java encoding name.
994      * @param ianaEncoding The IANA encoding name.
995      *
996      * @deprecated Use of this method is not recommended. Its
997      * effect is JVM wide and may cause unforeseen behaviour
998      * for other applications running in the system.
999      */

1000    public static void putJava2IANAMapping(String JavaDoc javaEncoding,
1001                                           String JavaDoc ianaEncoding) {
1002        fJava2IANAMap.put(javaEncoding, ianaEncoding);
1003    } // putJava2IANAMapping(String,String)
1004

1005    /**
1006     * Returns the IANA encoding name for the specified Java encoding name.
1007     *
1008     * @param javaEncoding The Java encoding name.
1009     */

1010    public static String JavaDoc getJava2IANAMapping(String JavaDoc javaEncoding) {
1011        return (String JavaDoc)fJava2IANAMap.get(javaEncoding);
1012    } // getJava2IANAMapping(String):String
1013

1014    /**
1015     * Removes a Java to IANA encoding name mapping.
1016     *
1017     * @param javaEncoding The Java encoding name.
1018     *
1019     * @deprecated Use of this method is not recommended. Its
1020     * effect is JVM wide and may cause unforeseen behaviour
1021     * for other applications running in the system.
1022     */

1023    public static String JavaDoc removeJava2IANAMapping(String JavaDoc javaEncoding) {
1024        return (String JavaDoc)fJava2IANAMap.remove(javaEncoding);
1025    } // removeJava2IANAMapping
1026

1027} // class EncodingMap
1028
Popular Tags