Bug report (uncritical): Loading BMP over HTTP fails

I have an ms3d model that contains a BMP texture. I load the model over HTTP:


TEXdir=new URL("http://localhost/models/");
TextureKey.setOverridingLocation(TEXdir);



The loader fails with:

java.lang.ArrayIndexOutOfBoundsException: 0
        at com.jme.image.BitmapHeader.read(BitmapHeader.java:277)
        at com.jme.util.TextureManager.loadBMPImage(TextureManager.java:474)
        at com.jme.util.TextureManager.loadImage(TextureManager.java:380)
        at com.jme.util.TextureManager.loadImage(TextureManager.java:363)
        at com.jme.util.TextureManager.loadImage(TextureManager.java:344)
        at com.jme.util.TextureManager.loadTexture(TextureManager.java:255)
        at com.jme.util.TextureManager.loadTexture(TextureManager.java:224)
        at com.jme.image.Texture.read(Texture.java:988)



It works when I set the texdir to a local file path
It also works when I use a PNG texture instead of BMP

It would be nice if this would fail with a more informative error message

it seems like the TextureManager fails to read any bytes from the DataInputStream (dis.available() returns 0).

If there is a call to InputStream.available() that really is a bug. available() could hardly be used correctly in there.

then it's a bug.