Find supported encodings at runtime

Is it possible to find out the list of characters encodings (UTF-8, cp1252) supported by the JVM dynamically at runtime?

I am aware that there is a list of supported encodings listed on the Sun site for Sun's JVM. However, I also know that the supported encodings can vary depending upon the implementation of the JVM. Is there a method that would allow me to get all the supported encodings at runtime? Thanks :)

[434 byte] By [shadow0_0] at [2007-9-26 2:17:50]
# 1
java.nio.Charset.availableCharsets();
rkippen at 2007-6-29 9:18:01 > top of Java-index,Desktop,I18N...
# 2

Try following code:

System.out.println("default: " + java.nio.charset.Charset.defaultCharset());

SortedMap<String,java.nio.charset.Charset> map = java.nio.charset.Charset.availableCharsets();

Collection<java.nio.charset.Charset> coll = map.values();

Iterator<java.nio.charset.Charset> it = coll.iterator();

while(it.hasNext())

System.out.println(it.next());

Anubis-Man at 2007-6-29 9:18:01 > top of Java-index,Desktop,I18N...