On Fri, 28 Apr 2006 18:07:22 +0200, max <> wrote,
quoted or indirectly quoted someone who said :
>I receive a file in an InputStream , and I'd like to know which kind of
>file is it, compressed, or not.
>How can I do it? Which method can I use on this InputStream
you could try reading it with GZIP and see if it fails. See
http://mindprod.com/applet/fileio.html for sample code.
Unfortunately GZIP does not hava file signature, or at least not an
obvious one. You might read up to see if there is one.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.