Is there any way in Java to take image width and height without transfer or download?

Viewed 2464

In order to get image's height we can use ImageIO.read(new URL("…")).getHeight().

My questions:

  1. Do I understand correctly that this method downloads the image to the local computer prior size calculation?
  2. If yes, to where exactly the image is downloaded — to some JVM's cache on HDD or directly to the RAM?
  3. Is there any way to take image's height without transfer or download? But with some kind of request to server?
2 Answers
Related