toByteArray
mimics ``byte[] String.getBytes(Charset charset)`` of jdk
Encodes this String into a sequence of bytes using the given Charset, storing the result into a new byte array.
@param charset The Charset to be used to encode the String
@return A byte array containing the resulting bytes
@since 1.6