453 |
*/ |
*/ |
454 |
private static String[] getISOStrings(String tableName) |
private static String[] getISOStrings(String tableName) |
455 |
{ |
{ |
|
List tempList; |
|
|
ResourceBundle bundle; |
|
|
Enumeration keys; |
|
456 |
int count = 0; |
int count = 0; |
457 |
String[] strings; |
ResourceBundle bundle = |
458 |
|
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); |
459 |
|
Enumeration e = bundle.getKeys(); |
460 |
|
ArrayList tempList = new ArrayList(); |
461 |
|
|
462 |
tempList = new ArrayList(); |
while (e.hasMoreElements()) |
|
bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); |
|
|
keys = ((Hashtable) bundle.getObject(tableName)).keys(); |
|
|
while (keys.hasMoreElements()) |
|
463 |
{ |
{ |
464 |
String nextString; |
String key = (String) e.nextElement(); |
465 |
|
|
466 |
nextString = (String) keys.nextElement(); |
if (key.startsWith(tableName + ".")) |
|
if (nextString.length() == 2 && |
|
|
Character.isLetter(nextString.charAt(0)) && |
|
|
Character.isLetter(nextString.charAt(1))) |
|
467 |
{ |
{ |
468 |
tempList.add(nextString); |
String str = key.substring(tableName.length() + 1); |
469 |
++count; |
|
470 |
|
if (str.length() == 2 |
471 |
|
&& Character.isLetter(str.charAt(0)) |
472 |
|
&& Character.isLetter(str.charAt(1))) |
473 |
|
{ |
474 |
|
tempList.add(str); |
475 |
|
++count; |
476 |
|
} |
477 |
} |
} |
478 |
} |
} |
479 |
strings = new String[count]; |
|
480 |
|
String[] strings = new String[count]; |
481 |
|
|
482 |
for (int a = 0; a < count; ++a) |
for (int a = 0; a < count; ++a) |
483 |
{ |
strings[a] = (String) tempList.get(a); |
484 |
strings[a] = (String) tempList.get(a); |
|
|
} |
|
485 |
return strings; |
return strings; |
486 |
} |
} |
487 |
|
|