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


Reply via email to