@Test public void testCleaningCharsetName() { assertEquals("UTF-8", CharsetUtils.clean("utf-8")); assertEquals(null, CharsetUtils.clean("")); assertEquals(null, CharsetUtils.clean(null)); assertEquals("US-ASCII", CharsetUtils.clean(" us-ascii ")); assertEquals("UTF-8", CharsetUtils.clean("\"utf-8\"")); assertEquals("ISO-8859-1", CharsetUtils.clean("ISO-8859-1, latin1")); }
public static String clean(String charsetName) { try { return forName(charsetName).name(); } catch (IllegalArgumentException e) { return null; } }
CharsetUtils { public static String clean(String charsetName) { try { return forName(charsetName).name(); } catch (IllegalArgumentException e) { return null; } } }
CharsetUtils { public static String clean(String charsetName) { try { return forName(charsetName).name(); } catch (IllegalArgumentException e) { return null; } }  }
CharsetUtils { public static String clean(String charsetName) { try { return forName(charsetName).name(); } catch (IllegalArgumentException e) { return null; } }  static boolean isSupported(String charsetName); static String clean(String charsetName); static Charset forName(String name); }
CharsetUtils { public static String clean(String charsetName) { try { return forName(charsetName).name(); } catch (IllegalArgumentException e) { return null; } }  static boolean isSupported(String charsetName); static String clean(String charsetName); static Charset forName(String name);  }