URLConnection

Dandekar, Hrishikesh Hrishikesh_Dandekar at NAI.com
Fri May 14 15:37:59 PDT 1999



Hi,

I'm trying to write a ClassLoader application which will fetch a couple of
classes over the net from the HTTP server.
i'm using kaffe beta 4.

......
......
......
URl url= new URL(urlname);
URLConnection connection = url.openConnection();
*********   int length= connection.getContentLength();   **********
byte[] data= new byte[length];
InputStream ins= connection.getInputStream();
ins.read(data);
......

However, the methods connection. { getContentLength() , getContentEncoding()
, getcontentType() } fail by returning  -1 or null... 
The same code works fine with sun's jvm...

what could be the possible problem?


Thanks.

-Hrishi


More information about the kaffe mailing list