JAVA中FileHelper的一个用法
来源:互联网 发布:手机智能对话软件 编辑:程序博客网 时间:2024/04/28 22:25
public boolean writeXML(String content, String filename)
{
String savepath;
FileOutputStream fout;
// log.info("content:"+content+" filename:"+filename+" writeDir:"+writeDir);
savepath = (new StringBuilder(String.valueOf(writeDir))).append(File.separatorChar).append(filename).toString();
fout = null;
if(content == null)
return false;
File file = new File(writeDir);
try
{
if(!file.exists()){
file.mkdirs();
}
fout = new FileOutputStream(savepath);
byte buffer[] = content.getBytes();
fout.write(buffer);
// break MISSING_BLOCK_LABEL_111;
}
catch(Exception e)
{
e.printStackTrace();
}
if(fout != null)
try
{
fout.close();
}
catch(IOException e)
{
return false;
}
// return false;
// Exception exception;
// exception;
if(fout != null)
try
{
fout.close();
}
catch(IOException e)
{
return false;
}
//throw exception;
if(fout != null)
try
{
fout.close();
}
catch(IOException e)
{
return false;
}
return true;
}
- JAVA中FileHelper的一个用法
- FileHelper 一个极好的数据文本文件处理类库
- unity的FileHelper
- FileHelper
- FileHelper
- FileHelper
- FileHelper
- java中synchronized用法+自己的一个小结~!
- java中<> 的用法
- java中"+"的用法
- java中synchronized用法 一个比喻
- 文件的简单读写操作,我有加注释!FileHelper
- FileHelper.cs
- java中this的用法
- Java中JTable的用法
- JAVA中final的用法
- java中this的用法
- JAVA中list的用法
- 让MyEclipse的xdoclet 识别自定义的标签属性
- 讲道理之忌
- 好运来
- GIS的下个十年(David Maguire, ESRI)
- AS3公式收集整理
- JAVA中FileHelper的一个用法
- Getting Started With QuickConnect Iphone » Apr 25 2009 8 Great Resources For Learning Iphone OpenGL ES
- Java中Pipe 的使用
- VS2005 常用快捷键
- C# 为类型扩展方法
- ARCGIS 之 dissolve append Merge union
- 创建SSH无密码登陆
- 句柄
- 【转】Java synchronized用法搜集