code: public static String rsaSign(String content, String privateKey, String charset,
                                   String signType) throws AlipayApiException {
  
          if (AlipayConstants.SIGN_TYPE_RSA.equals(signType)) {
  
              return rsaSign(content, privateKey, charset);
          } else if (AlipayConstants.SIGN_TYPE_RSA2.equals(signType)) {
  
              return rsa256Sign(content, privateKey, charset);
          } else {
  
              throw new AlipayApiException("Sign Type is Not Support : signType=" + signType);
          }
  
      }
docs: rsa内容签名
  
  @param content
  @param privateKey
  @param charset
  @return
  @throws AlipayApiException