public static String hex(byte[] bytes) {
        if (bytes == null) {
            return null;
        }

        int bytesLen = bytes.length;
        char[] chars = new char[bytesLen * 2];
        for (int i = 0; i < bytes.length; i++) {
            int a = bytes[i] & 0xFF;
            int b0 = a >> 4;
            int b1 = a & 0xf;

            chars[i * 2] = (char) (b0 + (b0 < 10 ? 48 : 55)); //hexChars[b0];
            chars[i * 2 + 1] = (char) (b1 + (b1 < 10 ? 48 : 55));
        }
        return new String(chars);
    }
Encode a byte array to hex string

@param bytes array of byte to encode
@return return encoded string
src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_bytes.java