See if file is empty
java
Solution
File file = new File("file_path");
System.out.println(file.length());
Problem
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.