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
URL url = new URL("http://l1.yimg.com/t/frontpage/baba-ramdev-310511-60.jpg");
//Set the user agent
System.setProperty("http.agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0");
//Use Http to get the head request
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
//head request to minimal response
urlConnection.setRequestMethod("HEAD");
length = (urlConnection).getContentLengthLong();