jsp生成html--replace
2004-11-29 17:15
483 查看
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();
}
}
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();
}
}
相关文章推荐
- 用Ole Automation实现Delphi和AutoCad之间的数据交换
- ATL实现Connection Point的一种简单的方法
- Java测试规范(引用)
- Hibernate Tool & Files
- Java面试题目
- 一个非常不错的业务规则管理器
- delphi中的时间操作技术(2)
- 解析IP地址为主机域名
- 将某一主机域名解析为IP地址
- 在做控件的存取控制时碰到的问题,请教各位!
- struts tag lib(1)
- 有关TrueDBGrid的问题向各位大虾请教
- 一个画图类,类似ms_chart的线图,适用于科学仿真数据分析(二)
- 一个画图类,类似ms_chart的线图,适用于科学仿真数据分析(一)
- Ant应用(1)
- Ant应用(2)
- 使用C#开发COM+组件
- 看到一篇好文章与大家分享!!!!!
- Netscaler数据索引String Map与Pattern Set的区别