Doesn't the webservice provide you with that information? There is no handy way to determine which kind of file/mine-type is in a file without meta-data. Although there are libraries that try to analyse the document and provide you with a mime-type.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Joined: Apr 10, 2009
The Web service may not contain the file name/type which I got this problem.
Anyway. thank you dileep and wouter for kind help!!