[4864] in java-interest
Re: URL help...
daemon@ATHENA.MIT.EDU (Chris Toomey)
Wed Jan 17 02:39:51 1996
Date: Tue, 16 Jan 96 21:44:34 PST
From: toomey@aolproductions.com (Chris Toomey)
To: benatip@pcd.kodak.com, java-interest@java.sun.com
> I'm trying to open a connection to a server in order to receive data--an
> image. As you will probably notice from the code below, I don't fully
> understand the way Java URL code is supposed to be written. Can someone
> out there please lend me a hand? Thanks in advance!
>
> Paul
>
> Below is the snippet of code I'm using...
>
> try
> {
> myURL = new URL("http", "webdev.kodak.com", "/cgi-bin/pcd/boy.pcd");
> URLConnection urlConnection = myURL.openConnection();
>
> currentImage = (Image) myURL.getContent();
> }
>
Paul, it's actually much easier than that:
currentImage = getImage("http://webdev.kodak.com/cgi-bin/pcd/boy.pcd");
That'll definitely work if it's a GIF image, not sure if it supports
other image formats thought (anybody know?).
Chris
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com