Does OpenJDK support bitmap image with JarURLConnection?
Jing LV
lvjing at linux.vnet.ibm.com
Tue Mar 8 01:13:55 PST 2011
ÓÚ 2011-3-1 18:44, Chris Hegarty дµÀ:
> Interesting... I would have guessed bmp would be supported too. It
> doesn't appear to be specific to JarURLConnection, raw file urls also
> exhibit the same behavior.
>
> Wow, last time content-types.properties was meaningfully changed was
> 1999, when PNG was added! I don't have any specific objection to adding it.
>
> -Chris.
>
>
Hi Chris,
Thanks for reply. So as we see no objection for this issue, would
someone help to raise a bug in the bug system? So that we can apply the
patch and fix this 12-year problem.
> On 03/ 1/11 09:27 AM, Jing LV wrote:
>> Hello,
>>
>> It is a little odd to me that I find OpenJDK JarURLConnection does not
>> support bmp file. The testcase below:
>>
>> public static void main(String[] args) throws MalformedURLException, IOException {
>> JarURLConnection conn = (JarURLConnection) new URL("jar:file:/somedir/somejar.jar!/somebmp.bmp").openConnection();
>> System.out.printf("Returned type for the entry should be the known type " +
>> "image/bmp, but it is " + conn.getContentType());
>> }
>>
>> (Need create a somejar.jar containing a bmp file named somebmp.bmp)
>>
>> It should return image/bmp but it does not. I see we may add image/bmp support in the windows\lib\content-types.properties to make the testcase pass.
>> However I am not sure if OpenJDK do want to support it, or there is some reason why OpenJDK don't?
>>
>>
--
Best Regards,
Jimmy, Jing LV
More information about the net-dev
mailing list