![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工具类
emo123ri
这个作者很懒,什么都没留下…
展开
-
文本标签过滤
public class HtmlCleaner { private static Pattern p_script; private static java.util.regex.Matcher m_script; private static Pattern p_style; private static java.util.regex.Matcher m_style; p原创 2015-08-27 17:35:17 · 370 阅读 · 0 评论 -
Java随机字符串
/** * 获取指定长度的随机码 * @param length 指定生成的长度 * @param bigchar 是否包含大写字母 true为包含,false 不包含,下面参数一样 * @param smallchar 是否包含小写字母 * @param num 是否包含数字 * @return result 返回Stri原创 2013-08-08 17:24:42 · 398 阅读 · 0 评论 -
BigDecimal格式化
//格式化为###,##0.00 public String formatNumber(BigDecimal b){ NumberFormat f = DecimalFormat.getCurrencyInstance(); ((DecimalFormat)f).applyPattern("###,###,###,##0.00") ;原创 2013-08-08 10:39:29 · 1733 阅读 · 0 评论 -
jackson json 转list/map
如果是ArrayList那么使用ObjectMapper 的getTypeFactory().constructParametricType(collectionClass, elementClasses);如果是HashMap那么 ObjectMapper 的getTypeFactory().constructParametricType(HashMap.class,String.c转载 2016-06-23 09:55:25 · 591 阅读 · 0 评论