question: public static boolean isValidCharset ( String charset ) { try { Charset . forName ( charset ) ; } catch ( UnsupportedCharsetException e ) { return false ; } return true ; }
target:  This methods tests if a charset is valid regarding the charset nio API.