Encodes a ByteArray for the provided encoder and returns the encoded data in the form of a CharArray.
Encodes a ByteArray for the provided encoder and returns the encoded data in the form of a String.