public static byte[] getBytes(final String s) {
        return s.getBytes(StandardCharsets.UTF_8);
    }
Get string bytes in UTF-8 charset.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Utils.java