文件的读写问题 怎样在原来文件的基础上写入文件,比如说:A.txt中本来有, abcdef,现在要加入ghi,变成,abcdefghi应该怎么做. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try { File f = new File("filename"); RandomAccessFile raf = new RandomAccessFile(f, "rw"); // Read a character char ch = raf.readChar(); // Seek to end of file raf.seek(f.length()); // Append to the end raf.writeChars("aString"); raf.close(); } catch (IOException e) { } 求救 這里userTrace.do表示什么 JNI调用MFC对话框出现异常 HashTableMap是不是java系统类啊? 高手帮忙看看我下面代码问什么 编译不通过哪!! 非常有意思的问题!!!! 有关regex 请问如能用java实现GIS那种地图浏览功能,或者介绍一下相关的资料! Java数据库编程的问题,欢迎大家讨论。 各位老大,让我的JFrame在屏幕上居中,应用哪个方法?!小弟感激不尽! 关于JAVA package的问题,求助位大侠!!! 关于C++通过JNI调Java方法的问题
File f = new File("filename");
RandomAccessFile raf = new RandomAccessFile(f, "rw");
// Read a character
char ch = raf.readChar();
// Seek to end of file
raf.seek(f.length());
// Append to the end
raf.writeChars("aString");
raf.close();
} catch (IOException e) {
}