hi I am using Jtidy parser in java.
URL url = new URL(\"http://l1.yimg.com/t/frontpage/baba-ramdev-310511-60.jpg\");
Image image = new ImageIcon(url).g
Try:
url.openConnection().getContentLength();
If this doesn't work, you can load the stream using:
url.openStream()
...and read the stream until the end, counting how many bytes were actually read. You might also use CountingInputStream decorator to reuse the stream later. However the first code snippet seems to work.