R
Rune
Hi,
I'm trying to make thumbnails of some images on the net. So I though I'd use
the ImageIO library. But apparently it only has this method to read images
from the net: read(java.net.URL). But I need to set the header referer
property on the net connection before reading the image. Which I had done
before with the URLConnection object.
(e.g.
URLConnection urlConn = url.openConnection();
urlConn.setRequestProperty("Referer", referer);
urlConn.connect();
)
But ImageIo.read() doesn't accept URLConnection. What do I do?
I'm trying to make thumbnails of some images on the net. So I though I'd use
the ImageIO library. But apparently it only has this method to read images
from the net: read(java.net.URL). But I need to set the header referer
property on the net connection before reading the image. Which I had done
before with the URLConnection object.
(e.g.
URLConnection urlConn = url.openConnection();
urlConn.setRequestProperty("Referer", referer);
urlConn.connect();
)
But ImageIo.read() doesn't accept URLConnection. What do I do?