title: how to get the size of an image in java
body: <p>hi
    I am using Jtidy parser in java.</p>
  
  <hr>
  
  <pre><code>URL url = new URL("http://l1.yimg.com/t/frontpage/baba-ramdev-310511-60.jpg");  
  Image image = new ImageIcon(url).getImage();
  int imgWidth = image.getWidth(null);
  int imgHeight = image.getHeight(null);
  </code></pre>
  
  <hr>
  
  <p>Above code is working fine,I am getting height &amp; width properly.But I want to see the size of an image (for example whether it is in KB,or in MB ).Please help me,how to get the size of an image.Is there any method.</p>