I have a program monitors log file changes. The program uses a FileInputStream to keep reading from the file. In the mean while, the log file might be rotated: the old log file is renamed and new log entries are written into a new file.
How can my program determines the file was rename so that it switch to read on the new log file?