If you want to delete content from the end of a file, you do have a couple of faster options. You can use RandomAccessFile's setLength() method, or FileChannel's truncate() method, to change the file length to something smaller. This effectively deletes the bytes at the end. If you want to delete content from the beginning or middle, though - for that you really want to do as Stan suggested.
"I'm not back." - Bill Harding, Twister
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com