![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e137. Getting an Image from a URLtry { // Create a URL for the image's location URL url = new URL("http://hostname:80/image.gif"); // Get the image java.awt.Image image = java.awt.Toolkit.getDefaultToolkit().getDefaultToolkit().createImage(url); } catch (MalformedURLException e) { } catch (IOException e) { }
e133. Converting Between a URL and a URI e134. Parsing a URL e135. Sending a POST Request Using a URL e136. Getting Text from a URL e138. Getting a Jar File Using a URL e139. Accessing a Password-Protected URL
© 2002 Addison-Wesley. |