class CharsetUtil {

    static public byte[] encode(CharSequence str0, String charsetName) {
        Charset charset = map(charsetName);
        if (charset == null) {
            return null;
        }
        return encode(str0, charset);
    }

}