jsp生成html--replace
来源:未知 责任编辑:智问网络 发表时间:2013-09-22 21:29 点击:次
package ball.news;
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();
}
}
相关新闻>>
- 发表评论
-
- 最新评论 更多>>