Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I read a file header?

807597Nov 4 2005 — edited Oct 6 2008
I want to validate that a given file actually is of a specific type. For instance that a .pdf file actually is a pdf file.

To achive this I want to read the header of the file and validate the header information.

Exactly how do I read header info from a file??

Links to examples or tutorials would be very welcome.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2008
Added on Nov 4 2005
8 comments
7,489 views