Map charsets = Charset.availableCharsets(); Iterator iterator = charsets.keySet().iterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); }