I\'m wondering what techniques and/or library to use to implement the functionality of the linux command \"tail -f \". I\'m essentially looking for a drop in add-on/replace
Here's a short story which you could use as a pointer:
I've coded TailingInputStream at work for the very same reason. It basically uses File and refreshed its contents on demand and checked against internal buffer if it has changed significantly (4kB memory stamp IIRC) and then did what the tail -f does. A bit hacky, yes, but it works perfectly and doesn't mess with Threads or anything fancy like that - it's compatible all the way back to 1.4.2 at least.
That said, it was a lot easier to do than ReverseInputStream which went from file's end to start and didn't die if the file was updated on the fly...