question: private static Charset toCharset ( String csn ) throws UnsupportedEncodingException { requireNonNull ( csn , "charsetName" ) ; try { return Charset . forName ( csn ) ; } catch ( IllegalCharsetNameException | UnsupportedCharsetException unused ) { throw new UnsupportedEncodingException ( csn ) ; } }
target:  Returns a charset object for the given charset name.