Encodes this String
into a sequence of bytes using the named
charset, storing the result into a new byte array.
The behavior of this method when this string cannot be encoded in
the given charset is unspecified. The java.nio.charset.CharsetEncoder
class should be used when more control
over the encoding process is required.
charsetName
| The name of a supported charset |
UnsupportedEncodingException
| If the named charset is not supported |
Diagram: String