This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xilai.cuteBoy.common.util; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpStatus; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.config.AuthSchemes; | |
import org.apache.http.client.config.CookieSpecs; | |
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; | |
import org.apache.http.client.methods.CloseableHttpResponse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xilai.cuteBoy.common.util; | |
import java.io.*; | |
import java.util.Enumeration; | |
import java.util.jar.JarEntry; | |
import java.util.jar.JarFile; | |
/************************************************************* | |
* Description: Jar工具类 | |
* Author: Liu Junbo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xilai.cuteBoy.common.util; | |
import java.security.MessageDigest; | |
/************************************************************* | |
* Description: MD5工具类 | |
* Author: Liu Junbo | |
* CreateTime: 2017/5/2 | |
************************************************************/ | |
public class MD5Util { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xilai.cuteBoy.common.util; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.MissingResourceException; | |
import java.util.ResourceBundle; | |
/************************************************************* | |
* Description: 资源文件读取工具 | |
* Author: Liu Junbo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xilai.cuteBoy.common.util; | |
import java.math.BigDecimal; | |
import java.util.LinkedList; | |
import java.util.List; | |
/************************************************************* | |
* Description: 计算当前坐标是否在不规则多变形内 | |
* 算法名称 Ray-casting Algorithm 光线投射算法 | |
* https://en.wikipedia.org/wiki/Point_in_polygon#Ray_casting_algorithm | |
* CreateTime: 2017/7/21 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xilai.cuteBoy.common.util; | |
import org.apache.commons.lang.StringUtils; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/************************************************************* | |
* Description: String 工具类 | |
* Author: Liu Junbo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maven依赖: | |
<dependency> | |
<groupId>org.apache.httpcomponents</groupId> | |
<artifactId>httpclient</artifactId> | |
<version>4.5.3</version> | |
</dependency> | |
List<NameValuePair> params = new ArrayList<NameValuePair>(); | |
params.add(new BasicNameValuePair("account", SmsConstant.SMS_USERNAME)); | |
params.add(new BasicNameValuePair("pswd",SmsConstant.SMS_PASSWORD)); |