`
raozhengyong
  • 浏览: 15856 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
文章列表
package com.cdqidi.appgateway.tools; import java.security.MessageDigest; /** * 使用MD5进行字符串加密(32位) * @author rzy * @version 1.0.1 */ public class MD5Encryption { /** * 使用MD5进行加密 * @param srcstr 要加密的字符串 * @return 32位密文 */ public static String toMD5(String srcstr) { cha ...
PS:上接DWR反向Ajax示例(1); 3.Java后台代码: package test; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import org.directwebremoting.WebContext; import org.directwebremoting.WebContextFactory; import org.directwebremoting.proxy.dwr. ...
1.javachat.jsp页面代码: <%@ page language="java" pageEncoding="UTF-8"%> <html> <head> <title>DWR反向Ajax示例</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content=& ...
package com.test; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.io.StringReader; import java.util.List; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import ...
public static final String removeSpace(String ss){ byte[] t = ss.getBytes(); for(int i=0;i<t.length;i++) { if(t[i] == -95 && t[i+1]==-95 ) { t[i]=32; if(i+1==t.length-1) { t[i+1] = 0; } ...
public class StringUtil { public static void replaceBlank() { Pattern p = Pattern.compile(“\\s*|\t|\r|\n”); String str="I am a, I am Hello ok, \n new line ffdsa!"; System.out.println("before:"+str); Matcher m = p.matcher(str); String after = m.replaceAll(& ...
Global site tag (gtag.js) - Google Analytics