• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Java help - file reading

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Sjaak

Member
Joined
Apr 26, 2004
Location
The Netherlands
I need some help here :) Must write a Java program that allows the user to browse to a specific location (standard method for this is present in Java - so thats not a problem), but then, i need the program to recognise the file's extension and depending on it being XML, fasta or a few other extensions, perform a different set of tasks on the file. I intend to write separate classes for each set of operations, to be called upon when the file is identified, but how can i do it? Is there a way i can save or display the loaded files name as a string so i can compare extensions, or any other way to have java check the format?

tia,

Tim
 
Back