public static Reader newReader (ReadableByteChannel ch, String csName)

Constructs a reader that decodes bytes from the given channel according to the named charset.

An invocation of this method of the form

 Channels.newReader(ch, csname)
behaves in exactly the same way as the expression
 Channels.newReader(ch,
                    Charset.forName(csName)
                        .newDecoder(),
                    -1);

Parameters:
ch     The channel from which bytes will be read
csName     The name of the charset to be used

Returns:  A new reader

Exceptions:
UnsupportedCharsetException     If no support for the named charset is available in this instance of the Java virtual machine