Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31355

Re: mimetype

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: mimetype
Date Mon, 23 Mar 2015 19:27:01 -0400
Organization A noiseless patient Spider
Lines 37
Message-ID <meq7gm$f28$1@dont-email.me> (permalink)
References <meht37$264h$1@ariadne.rz.tu-clausthal.de> <550e2306$0$289$14726298@news.sunsite.dk> <melpt7$pm9$1@ariadne.rz.tu-clausthal.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Mon, 23 Mar 2015 23:27:18 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="c50a9e5d554cfaba13eda1c71e805135"; logging-data="15432"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Myex5n7Kelxu6QbBZ848hikrbStKNIfs="
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0
In-Reply-To <melpt7$pm9$1@ariadne.rz.tu-clausthal.de>
Cancel-Lock sha1:6bnoPiK6xcLpz/sFQ/aUMZQWtrw=
Xref csiph.com comp.lang.java.programmer:31355

Show key headers only | View raw


On 03/22/2015 05:35 AM, Philipp Kraus wrote:
> On 2015-03-22 02:03:50 +0000, Arne Vajhøj said:
>
>
> On 3/20/2015 6:02 PM, Philipp Kraus wrote:
>
> I try to get the mimetype of an URL. My URL points to
>
> file://.../file.css or *.js or *.htm, I use this call to get the mimetye:
>
>
> URLConnection.guessContentTypeFromName( l_physicalfile.toString() );
>
>
> but on *.css or *.js file I get a null / empty value. I'm using Java
>
> 1.8, so how can I get the mimetype for my files?
>
>
> Couple of suggestions:
>
>
> 1) Find a more reliable method.:-)
>
>
> 2) Edit jre lib content-types.properties to have all the types you need.
>
>
> I'm using https://sourceforge.net/projects/mime-util/
>
> at the moment exists only some types, which are not correct defined
>
>
I'm guessing this a moment different from the moment of you're original 
post.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

mimetype Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-03-20 23:02 +0100
  Re: mimetype Arne Vajhøj <arne@vajhoej.dk> - 2015-03-21 22:03 -0400
    Re: mimetype Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-03-22 10:35 +0100
      Re: mimetype Jeff Higgins <jeff@invalid.invalid> - 2015-03-23 19:27 -0400

csiph-web