Home » Core Java » net » URL

URL

java.net.URL Example

In this example, we will show the range of functionality provided by the java.net.URL class. This class represents a Uniform Resource Locator, a pointer to a “resource” on the World Wide Web. An URL is a text string that identifies a resource, tells where to find it, and specifies a method for communicating with it or retrieving it from its ...

Read More »

Read text from URL

This is an example of how to parse text from a URL. The URL Class is used to represent a Uniform Resource Locator, a pointer to a “resource” on the World Wide Web. Parsing text from a URL implies that you should: Create a URL object from the String representation.  Use openStream() API method to open a connection to this ...

Read More »

Parse URL example

In this example we shall show you how to parse a URL. Class URL represents a Uniform Resource Locator, a pointer to a “resource” on the World Wide Web. A resource can be something as simple as a file or a directory, or it can be a reference to a more complicated object, such as a query to a database ...

Read More »

Convert between URL and URI

With this example we are going to demonstrate how to convert between a URL and a URI. Class URL represents a Uniform Resource Locator, a pointer to a “resource” on the World Wide Web. A resource can be something as simple as a file or a directory, or it can be a reference to a more complicated object, such as ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns