Possible Duplicate:
Most efficient way to check if a file is empty in Java on Windows
How to a check if a file is empty in Java 7?
I tried it using the available() method from ObjectInputStream, but it returns always zero even if the the file contains data.