当前位置: 移动技术网 > IT编程>开发语言>Jsp > jsp生成html--writehtml

jsp生成html--writehtml

2018年11月06日  | 移动技术网IT编程  | 我要评论


writehtml.java

package ball.news;

import java.io.*;

public class writehtml
{

    public writehtml()
    {
    }

    public static void save(string s, string s1, string s2)
       
    {
        try
        {
            a(s1);
            fileoutputstream fileoutputstream = new fileoutputstream(s1 + s2);
            byte abyte0[] = s.getbytes();
            fileoutputstream.write(abyte0);
            fileoutputstream.close();
        }
        catch(ioexception e)
        {
         system.out.println("write html error"+e.getmessage());
        }
    }

    private static void a(string s)
    {
       try
       {
        file file = new file(s);
        if(!file.exists())
            file.mkdirs();
       }
       catch (exception e)
       {
        system.out.println("mkdirs error!"+e.getmessage());
       }
    }
}

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网