If you run your code with a bad file name, the JVM will show you exactly what exception you should be catching. Same for the file having bad data. Why not try this and see what exceptions the JVM...