在对file的文件操作时,我如何实现用程序里插入数据而不覆盖原来的数据,使得数据自动添加。
解决方案 »
- JFileChooser如何保存特定的文件类型啊
- 高手帮忙看看我这个程序为什么运行后没有什么反应,谢谢!!
- 怎么一用button调用函数就死机呢
- 数中数的问题
- java可不可以编写成exe文件没得,执行时内存占用多大?
- servlet和applet问题,大家讨论
- 如何判断单击的是JButton,还是其他组件?
- 为什么drawString()输出的字符串不换行??打印机输出也是这个问题
- 这是什么错误?exception:com.ms.security.SecurityExceptionEx[Computer_client.start]:
- 如何向主窗口传递消息
- QQ 程序,诚寻熟悉桌面编程的朋友一起开发
- 在applet中解析xml,这个applet怎么在网页中显示阿,急!!
//其他的FileWriter等都类似,楼主看看api好了FileOutputStream
public FileOutputStream(String name,
boolean append)
throws FileNotFoundExceptionCreates an output file stream to write to the file with the specified name. If the second argument is true, then bytes will be written to the end of the file rather than the beginning. A new FileDescriptor object is created to represent this file connection.
First, if there is a security manager, its checkWrite method is called with name as its argument. If the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason then a FileNotFoundException is thrown.
Parameters:
name - the system-dependent file name
append - if true, then bytes will be written to the end of the file rather than the beginning