public static <T> T withLockObject(final T obj) {
        return Requires.requireNonNull(obj, "obj");
    }
Get string bytes in UTF-8 charset.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Utils.java