Network API allows us to use URLs in the source layer by providing URL classes. Each URL object has encapsulated resources identifiers and protocol handles. The front tip shows that one of the ways to obtain the URL object is to call the TOURL () method of the URI object. But this choice is not convenient (why do you have to build a URI object when you need a URL object?). Instead, you can call the URL constructor to create a URL object. You can also call the URL method to extract the URL components, open an input stream read information from the resource, get a reference to the object that can easily retrieve resource data, compare the URL in the two URL objects, Get the connection object of the resource, which allows the code to understand (and write) more resources information.
Full text reading:
Java Network Programming URI, URL Research (below)