Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get MIME type from byte[]

Status
Not open for further replies.

DingChavez

Programmer
Mar 3, 2006
12
CA
HI! I call a web service to get a file from a server. The web service returns me a byte[] (the file), but I don't know how to get the MIME type from it?

Any help?

Thanks.
 
How do you even know there is a MIME type ?

An array of bytes can be anything !

You must either :

Analyse the data yourself to determine the data type,
OR
Change the host webservice to notify you of the data type

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I know that byte[] can be anything and do know the web service returns me a file in byte[], I was just wondering if there was a API to retrieve the mime type, obviously not!!

Too bad :))
 
Hehe nice try Diancecth :)) but no. I think I'll have a word with the host...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top