I*******e 发帖数: 1879 | 1 ☆─────────────────────────────────────☆
bee (只会嗡嗡叫的蜜蜂) 于 (Thu Jan 16 08:13:40 2003) 提到:
Currently I use FileWriter to open a file in append mode.
If meet exception, then return "file is locked", and closed the file if
file is not locked.
Is there any other way? Just curious. Thanks.
☆─────────────────────────────────────☆
magicfat (魔法胖子) 于 (Thu Jan 16 10:42:48 2003) 提到:
If you are using JDK 1.4, java.nio.channels.FileChannel.lock() or trylock()
is probably what you are looking for.
I |
|