- 浏览: 15856 次
- 性别:
- 来自: 成都
最新评论
-
alask2011:
...
DWR反向Ajax示例(1) -
Vimesly:
谢谢 不错支持你下!
Java去除字符串中的空格,回车,换行符,制表符 -
szwx855:
不错哦~~顶你
Java去除字符串中的空格,回车,换行符,制表符
文章列表
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 ...
- 2009-08-27 15:53
- 浏览 1338
- 评论(0)
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. ...
- 2009-08-13 10:56
- 浏览 1376
- 评论(0)
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=& ...
- 2009-08-13 10:49
- 浏览 2761
- 评论(1)
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 ...
- 2009-08-12 14:56
- 浏览 1946
- 评论(0)
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;
}
...
- 2009-03-23 15:09
- 浏览 2598
- 评论(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(& ...
- 2009-03-23 15:02
- 浏览 5837
- 评论(2)