??? 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) {
??? }
|----------------------------------------------------------------------------------------|
版權聲明 版權所有 @zhyiwww
引用請注明來源 http://m.tkk7.com/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2006-06-13 12:06
zhyiwww 閱讀(319)
評論(0) 編輯 收藏 所屬分類:
code demo -java