摘要: import java.math.BigDecimal; public class BigDecimalUtil { public static BigDecimal format(BigDecimal val) { return val.divide(new BigDecimal("1"),2,BigDecimal.ROUND_DOWN); } ... 阅读全文
posted @ 2018-08-02 15:22 yi点黑暗 阅读(522) 评论(0) 推荐(0) 编辑
摘要: import java.util.regex.Matcher; import java.util.regex.Pattern; public abstract class StringVerifyHelper { /** * 匹配纯汉字 * 格式 : * 匹配 : * 不匹配: */ public static final... 阅读全文
posted @ 2018-08-02 14:34 yi点黑暗 阅读(408) 评论(0) 推荐(0) 编辑
摘要: import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.F... 阅读全文
posted @ 2018-08-02 14:32 yi点黑暗 阅读(697) 评论(0) 推荐(0) 编辑
摘要: import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5 { public MD5() { md5Init(); retu... 阅读全文
posted @ 2018-08-02 14:22 yi点黑暗 阅读(1194) 评论(0) 推荐(0) 编辑
摘要: import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import javax.crypto.spec.IvParameterSpec; impo... 阅读全文
posted @ 2018-08-02 14:17 yi点黑暗 阅读(127) 评论(0) 推荐(0) 编辑
摘要: import java.security.MessageDigest; public class SHA1 { private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f 阅读全文
posted @ 2018-08-02 14:15 yi点黑暗 阅读(259) 评论(0) 推荐(0) 编辑
摘要: import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import java.security.Key; import java.security.KeyFactory; import java.security.spec.PKCS8EncodedKeySpec; import java.securi... 阅读全文
posted @ 2018-08-02 14:13 yi点黑暗 阅读(437) 评论(0) 推荐(0) 编辑
摘要: import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.d... 阅读全文
posted @ 2018-08-02 14:09 yi点黑暗 阅读(140) 评论(0) 推荐(0) 编辑
摘要: import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageEncoder; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; ... 阅读全文
posted @ 2018-08-02 14:07 yi点黑暗 阅读(183) 评论(0) 推荐(0) 编辑
摘要: import org.apache.commons.codec.binary.Base64; import java.io.*; public class Img2Base64Util { /** * 将图片转换成Base64编码 * @param imgFile 待处理图片 * @return */ public static S... 阅读全文
posted @ 2018-08-02 14:04 yi点黑暗 阅读(334) 评论(0) 推荐(0) 编辑
摘要: import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; imp... 阅读全文
posted @ 2018-08-02 13:59 yi点黑暗 阅读(369) 评论(0) 推荐(0) 编辑
摘要: import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; import java.security.NoSuchAlgorithmException; public class DESC... 阅读全文
posted @ 2018-08-02 13:53 yi点黑暗 阅读(357) 评论(0) 推荐(0) 编辑
摘要: import java.io.UnsupportedEncodingException; public class Base64Utils { private static char[] base64EncodeChars = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', &# 阅读全文
posted @ 2018-08-02 11:07 yi点黑暗 阅读(6737) 评论(0) 推荐(0) 编辑
摘要: import java.io.UnsupportedEncodingException; public class Base64 { public static final int DEFAULT = 0; public static final int NO_PADDING = 1; public static final int NO_WRAP = 2; ... 阅读全文
posted @ 2018-08-02 11:04 yi点黑暗 阅读(594) 评论(0) 推荐(0) 编辑