Even though I don't have all the information, I'm gonna make the call that the file is missing from the path you've given. The javadoc for length() specifically mentions this case will return 0.
So try checking exists() before you do anything with the file.