MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

newio/AvailableCharSets.java:10–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

8
9public class AvailableCharSets {
10 public static void main(String[] args) {
11 SortedMap<String,Charset> charSets =
12 Charset.availableCharsets();
13 for(String csName : charSets.keySet()) {
14 System.out.print(csName);
15 Iterator aliases = charSets.get(csName)
16 .aliases().iterator();
17 if(aliases.hasNext())
18 System.out.print(": ");
19 while(aliases.hasNext()) {
20 System.out.print(aliases.next());
21 if(aliases.hasNext())
22 System.out.print(", ");
23 }
24 System.out.println();
25 }
26 }
27}
28/* Output: (First 7 Lines)
29Big5: csBig5

Callers

nothing calls this directly

Calls 5

printMethod · 0.80
getMethod · 0.65
nextMethod · 0.65
iteratorMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected