write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this file output stream.
Writes len bytes from the specified byte array starting at offset off to this file output stream.
解决方案 »
- hibernate3.2无法启动2级缓存
- 编号的自动生成?
- 紧急求助!!关于struts中的session
- jasperreport+ireport做报表处理logon(处理图片显示的问题),多谢大家帮助?急!!!!
- JSP分页显示每页少一条记录的问题
- struts 中英文动态切换问题(动态国际化问题)
- 高分求jsp即时通讯思路
- 关于OSCache的问题
- 谁用过WebLogic Server 9呀,指点一下我这个新手吧!
- 一个奇怪的问题,请各位老大帮忙看看是什么错
- JDK1.31,mysql在SELECT * FROM RSVNO where tdate='2003-12-01';则会出错,tdate为日期字段
- 我用Dreamweaver MX 做JSP,怎么样才能在按F12的时候出来预览界面!
int off,
int len)
throws IOExceptionParameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
{
// Open a writer to the file, then write the string.
BufferedWriter bwriter;//writer to the file
String fullfilepath;//path for the output file
try
{
bwriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename)));
bwriter.write(str);
bwriter.flush();
bwriter.close();
}//try
catch(Exception e)
{
throw e;
}//catch
共写出多少长度Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
StringBuffer txtConcent = new StringBuffer() ;
String sSrcName="c:\\test.txt";
txtConcent.append("abc") ;
try
{
java.io.PrintWriter pw = new java.io.PrintWriter(new java.io.FileWriter(sSrcName, true), true);
pw.println(txtConcent.toString());
}
catch (Exception e)
{
}
%>