public static Writer newWriter ( WritableByteChannel ch , String csName ) { checkNotNull ( csName , "csName" ) ; return newWriter ( ch , Charset . forName ( csName ) . newEncoder ( ) , - 1 ) ; }
Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel .