Article View: borland.public.jbuilder.java.language
Article #14656Re: Help needed with cross platform File types (emergency!)
From: David Graff
Date: Tue, 10 Aug 1999 00:00
Date: Tue, 10 Aug 1999 00:00
90 lines
3574 bytes
3574 bytes
This is a multi-part message in MIME format. --------------C316E04F90D8E655B71B4BE3 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable the unix way of doing it would be to check the Magic number of the file. = Mac on the other hand probably does it the same way (magic number). Windoze how= ever bases all it's type information on extensions. Eric Maziade wrote: > I'll try to come to an understanding with my client (so he will add a .= jpg > or .jpeg at the end of his files - he's the one that needs to be > crossplatform, so...) > But nevertheless, I do not know how mac computers store their filetypes= =2E.. I > think there is a mac api call that will return something to identify th= e > file... I half expected to see a crossplatform version of that with jav= a... > but then again, I have a hard time figuring how it could really work > platform independently in any other fashion than the one you described.= =2E. > > Thank you very much for your help! > > -- > > --- > Eric Maziade > Concepteur en technologies de pointe multim=E9dia > http://www.novisoft.com > http://www.novisoft.com/maze > Steve Schafer (TeamB) <pandeng@telepath.com> wrote in message > news:37cc6506.323766979@90.0.0.40... > > On Tue, 10 Aug 1999 11:05:58 -0400, "Eric Maziade" > > <maze@novisoft.com.nospam> wrote: > > > > >Anyone knows how to know what type a file is, platform-independently= ? > > > > The only way to really "know" what type a file may be is to open it u= p > > and look inside. For example, JFIF-format JPEG files will contain the= > > string "JFIF" near the beginning of the file. > > > > Even so, you have to rely on various heuristics--a file could look > > like it conforms to some specification, and you might not be able to > > tell that it actually conforms to some other specification until > > you've read the first 50 megabytes of it. > > > > -Steve > > -- **************************************************************** David J. Graff IQXPERT mailto:david.graff@iqxpert.com Phone: (770) 953-1464 Direct: (770) 240-2289 Fax: (770) 953-1574 **************************************************************** --------------C316E04F90D8E655B71B4BE3 Content-Type: text/x-vcard; charset=us-ascii; name="david.graff.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for David Graff Content-Disposition: attachment; filename="david.graff.vcf" begin:vcard n:Graff;David tel;fax:(770) 953-1574 tel;work:(770) 240-2289 x-mozilla-html:TRUE url:http://www.iqxpert.com org:IQXPERT version:2.1 email;internet:david.graff@iqxpert.com title:Software Engineer adr;quoted-printable:;;5500 Interstate North Parkway=0D=0ASuite 507;Atlanta;GA;30328;USA x-mozilla-cpt:;1776 fn:David Graff end:vcard --------------C316E04F90D8E655B71B4BE3--
Technical Details
Message-ID:
<37B08FB2.85E032AC@iqxpert.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7opf28$aak1@forums.borland.com> <37cc6506.323766979@90.0.0.40> <7oq0ip$al611@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,99c37293ba93bd21 X-Google-Attributes: gidf74b3,public From: David Graff <david.graff@iqxpert.com> Subject: Re: Help needed with cross platform File types (emergency!) Date: 1999/08/10 Message-ID: <37B08FB2.85E032AC@iqxpert.com> X-Deja-AN: 511188280 References: <7opf28$aak1@forums.borland.com> <37cc6506.323766979@90.0.0.40> <7oq0ip$al611@forums.borland.com> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------C316E04F90D8E655B71B4BE3" Organization: IQXPERT Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language