工具类
文章平均质量分 86
IIXL
这个作者很懒,什么都没留下…
展开
-
解析soap报文
public static Map parseSoap(String soap) throws DocumentException, DocumentException { org.dom4j.Document doc = DocumentHelper.parseText(soap);//报文转成doc对象 Element root = doc.getRootElement();//获取根元素,准备递归解析这个XML树 Map<String,Object>map = new Hash转载 2020-09-03 16:59:55 · 938 阅读 · 0 评论 -
AES加解密
/** * * @author csl 加密解密 */public class AesUtil{ /** * 密钥如超过16位,截至16位,不足16位,补/000至16位 * * @return 新密钥 */ public static String secureBytes(String key) { if (key.length() > 16) { key = ke原创 2020-06-03 14:47:31 · 187 阅读 · 0 评论 -
Base64工具类
Base64import java.io.ByteArrayInputStream;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.ut...原创 2019-06-24 14:05:34 · 381 阅读 · 0 评论 -
Blob类型下载
public static boolean dowloadToBlob(Attchment Attachment,HttpServletRequest request, HttpServletResponse response) {try {String filename = Attachment.getStrFileName();byte[] fileStream = ImageUtils...原创 2019-06-24 14:08:05 · 1890 阅读 · 0 评论 -
image工具类谷歌图片压缩
import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.InputStream;import java.sql.Blob;import org.apache.commons.codec.binary.Base64;import org.slf4j.Logger;imp...原创 2019-06-24 14:11:03 · 210 阅读 · 0 评论 -
java递归生成树形菜单
/**递归所有配置数据@param list 所有数据List@param parentId 开始递归的parentId@return*/public List buildTree(List list, int parentId){List trees = new ArrayList();for (BaseConfigModel entity : list) {i...转载 2019-06-24 14:13:56 · 357 阅读 · 0 评论 -
java记录计算同比上升下降
/**、 * @date 2019年9月10日10:17:37 * @author 崔世良 * @param preNum 同期数 * @param sufNum 往期数 */ public String percentBigDecimal(BigDecimal preNum,BigDecimal sufNum){ double result = countDecimal...原创 2019-09-19 09:08:29 · 1949 阅读 · 0 评论