摘要: 将GBK编码的文件转为UTF-8编码的文件 配合使用:下载的压缩包解压为文件然后解码 /** * 把GBK文件转为UTF-8 * 两个参数值可以为同一个路径 * @param srcFileName 源文件 * @param destFileName 目标文件 * @throws IOExcepti 阅读全文
posted @ 2020-10-29 15:23 爱跳舞的程序员 阅读(109) 评论(0) 推荐(0) 编辑
摘要: package com.***.tools; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import j 阅读全文
posted @ 2020-10-29 15:19 爱跳舞的程序员 阅读(172) 评论(0) 推荐(0) 编辑
摘要: /** * 下载url的文件到指定文件路径里面,如果文件父文件夹不存在则自动创建 * url 下载的http地址 * path 文件存储地址 * return 如果文件大小大于2k则返回true */ public static boolean downloadCreateDir(String ur 阅读全文
posted @ 2020-10-29 15:16 爱跳舞的程序员 阅读(128) 评论(0) 推荐(0) 编辑
摘要: package com.xxx.util; import java.io.Serializable; import java.math.BigDecimal; import java.math.RoundingMode; /** * @ClassName: DoubleTool * @Descrip 阅读全文
posted @ 2020-10-29 15:12 爱跳舞的程序员 阅读(122) 评论(0) 推荐(0) 编辑
摘要: package com.xxx.core.util; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList 阅读全文
posted @ 2020-10-29 15:08 爱跳舞的程序员 阅读(85) 评论(0) 推荐(0) 编辑
摘要: package org.smart4j.framework.util; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; imp 阅读全文
posted @ 2020-10-29 15:07 爱跳舞的程序员 阅读(289) 评论(0) 推荐(0) 编辑
摘要: public class CodecUtil { private static final Logger LOGGER = LoggerFactory.getLogger(CodecUtil.class); /** * 将URL编码 */ public static String encodeURL 阅读全文
posted @ 2020-10-29 15:05 爱跳舞的程序员 阅读(110) 评论(0) 推荐(0) 编辑
摘要: public class StreamUtil { private static final Logger LOGGER = LoggerFactory.getLogger(StreamUtil.class); /** * 从输入流中获取字符串 * @param is * @return */ pu 阅读全文
posted @ 2020-10-29 15:04 爱跳舞的程序员 阅读(116) 评论(0) 推荐(0) 编辑
摘要: String dirPath = fhycgzController.class.getClassLoader().getResource("/").getPath() + File.separator + "conf"; Properties p = new Properties(); p.load 阅读全文
posted @ 2020-10-29 15:02 爱跳舞的程序员 阅读(82) 评论(0) 推荐(0) 编辑
摘要: /** * 数组工具类 */ public class ArrayUtil { /** * 判断数组是否为空 * @param array * @return */ public static boolean isNotEmpty(Object[] array){ return !isEmpty(a 阅读全文
posted @ 2020-10-29 15:01 爱跳舞的程序员 阅读(86) 评论(0) 推荐(0) 编辑
摘要: package com.***.util; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import java.util.Collec 阅读全文
posted @ 2020-10-29 14:56 爱跳舞的程序员 阅读(137) 评论(0) 推荐(0) 编辑
摘要: package com.***.util; /** * CastUtil * @description: 数据转型工具类 **/ public class CastUtil { /** * @Description: 转为String类型 * @Param: [obj] * @return: jav 阅读全文
posted @ 2020-10-29 14:55 爱跳舞的程序员 阅读(182) 评论(0) 推荐(0) 编辑
摘要: package com.***.util; /** * StringUtil * @description: 字符串工具类 **/ public class StringUtil { /** * 判断是否为空字符串最优代码 * @param str * @return 如果为空,则返回true */ 阅读全文
posted @ 2020-10-29 14:50 爱跳舞的程序员 阅读(163) 评论(0) 推荐(0) 编辑
摘要: package com.xxx.util; import java.io.PrintWriter; import java.io.StringWriter; import java.security.MessageDigest; import java.text.DecimalFormat; imp 阅读全文
posted @ 2020-10-29 14:48 爱跳舞的程序员 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 其他注解可以查看这个链接http://www.blogjava.net/supercrsky/articles/247449.html public class RESTUtil { protected static final Logger logger = LoggerFactory.getLo 阅读全文
posted @ 2020-10-29 10:10 爱跳舞的程序员 阅读(314) 评论(0) 推荐(0) 编辑