code: public static byte[] chars2Bytes(final char[] chars) {
          if (chars == null || chars.length <= 0) return null;
          int    len   = chars.length;
          byte[] bytes = new byte[len];
          for (int i = 0; i < len; i++) {
              bytes[i] = (byte) (chars[i]);
          }
          return bytes;
      }
docs: charArr转byteArr
  
  @param chars 字符数组
  @return 字节数组