Link to home
Start Free TrialLog in
Avatar of gdkinney_2
gdkinney_2

asked on

How can I check to see if a java.io.File is a PDF file?

How can I check to see if a java.io.File is a PDF file?  I have a Java java.io.File type how can I determine if it's a PDF file type?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gdkinney_2
gdkinney_2

ASKER

If I send this a Word file that has a .pdf extension (for example "myfile.pdf" - actually a Word file) does this method return true or false?

Thanks
false. Try it ;)
Thanks CEHJ :).
:)