• Post Reply Bookmark Topic Watch Topic
  • New Topic

Validate a file  RSS feed

 
Mahesh Pinnamaneni
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I need to find whether the files in a directory is corrupted or not..
we have some pdf's which gives some error like "this document is corrupted" or some thing like this in a directory. I need to find out which of the files were giving this errors..I cannot open each file to chek for the error. hence i am thinking of writing a java program for this.
appreciate if you can throw some points
thanks,
mahesh
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have parsing facilities for pdfs? If you can parse pdf, then you can go through it and find compiler errors. Otherwise you would be stuck with catching Exceptions.

If you can parse pdf, try producing a pdf reader and selling it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!