jsp生成html--replace

来源: LUPA开源社区
发布时间: 2007-05-27 03:50 版权申明

字体:


文章来源于http://www.lupaworld.com

import java.io.*;
import news.ReadTemplates;
public class ReplaceAll
{
private static Object a = new Object();
public ReplaceAll()
{
}

public String replace(String content,String flag,String temp)
{
String str = null;

try
{
//System.out.println("before-----"+content);
String s1 = content;
str = s1.replaceAll(flag,temp);
// System.out.println("replace after-----"+str);
}
catch(Exception e)
{
System.out.println("replace all error:"+e.getMessage());
}
return str;

}
private static void a(String s)
{
File file = new File(s);
if(!file.exists())
file.mkdirs();
}
}



文章来源于http://www.lupaworld.com

声明:LUPA开源社区刊登此文只为传递信息,并不表示赞同或者反对。

查看全部评论(0)我来说两句 直接向LUPA提出您的宝贵建议

-5 -3 -1 - +1 +3 +5