O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the URL Classes

Before jumping into the classes that are provided by the Java core API for dealing with URLs and the Web, you need to understand what is being referred to as URLs.

What Are URLs?

The primary classification of URLs is the scheme, which usually corresponds to an application protocol. Schemes include HTTP, FTP, Telnet, and Gopher. The rest of the URL syntax is in a format that depends on the scheme. A colon separates these two portions of information:

scheme-name:scheme-info

Thus, while mailto:chuckcavaness@yahoo.com indicates "send mail to user 'chuckcavaness'at the machine yahoo.com," ftp://chuckcavaness@foobar.org means "open an FTP connection to foobar.org and log in as user chuckcavaness."

Although IP addresses uniquely ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required