0% found this document useful (0 votes)
120 views1 page

URI Dan URL

The document discusses URIs and URLs. It defines a URI as a string that identifies a resource, such as a file, email address, or other item. A URL is the most common type of URI and includes a specific network location to retrieve the resource. The syntax of a URI includes a scheme and scheme-specific part, such as http:// for a web address. Common URI schemes are listed. A URL provides a network location for the resource using the format protocol://userInfo@host:port/path?query#fragment. The document provides tasks to extract parts of a URI or URL and grab data from a website by URL.

Uploaded by

helen mrbn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views1 page

URI Dan URL

The document discusses URIs and URLs. It defines a URI as a string that identifies a resource, such as a file, email address, or other item. A URL is the most common type of URI and includes a specific network location to retrieve the resource. The syntax of a URI includes a scheme and scheme-specific part, such as http:// for a web address. Common URI schemes are listed. A URL provides a network location for the resource using the format protocol://userInfo@host:port/path?query#fragment. The document provides tasks to extract parts of a URI or URL and grab data from a website by URL.

Uploaded by

helen mrbn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

URI dan URL Class

Java Network Programming 4th ed


Page 117 - 149

A URL unambiguously identifies the location of a resource on the Internet. A URL is the most common
type of URI, or Uniform Resource Identifier. A URI can identify a resource by its network location, as in a
URL, or by its name, number, or other characteristics. The URL class is the simplest way for a Java
program to locate and retrieve data from the network.

URI

A Uniform Resource Identifier (URI) is a string of characters in a particular syntax that identifies a
resource. The resource identified may be a file on a server; but it may also be an email address, a news
message, a book, a person’s name, an Internet host, the current stock price of Oracle, or something else.

The syntax of a URI is composed of a scheme and a scheme-specific part, separaa colon, like this:

scheme:scheme-specific-part

The syntax of the scheme-specific part depends on the scheme being used. Current schemes include:

a. Data : Base64-encoded data included directly in a link; see RFC 2397


b. File : A file on a local disk
c. ftp : An FTP server
d. http : A World Wide Web server using the Hypertext Transfer Protocol
e. mailto : An email address
f. magnet : A resource available for download via peer-to-peer networks such as BitTorrent
g. telnet : A connection to a Telnet-based service
h. urn : A Uniform Resource Name

URL

A URL is a URI that, as well as identifying a resource, provides a specific network location for the
resource that a client can use to retrieve a representation of that resource. By contrast, a generic URI
may tell you what a resource is, but not actually tell you where or how to get that resource.

The syntax of a URL is:

protocol://userInfo@host:port/path?query#fragment

Tugas Mandiri :

Baca Chapter URI dan URL pada halaman yang tertera di atas, lalu buatlah program untuk :

1. Mengekstrak bagian-bagian dari sebuah URI and URL pada string link yang diinputkan sesuai
dengan sintaks skema dari URI itu sendiri
2. Melakukan grabbing data pada sebuah website; pada program ini user akan menginputkan link
http://www.bmkg.go.id/BMKG_Pusat/Kualitas_Udara/Informasi_Partikulat.bmkg
- Ketika user menginputkan link, maka program akan membaca url dan mengambil data
halaman website, lalu masukkan halaman website tersebut ke dalam sebuah file txt.
- Lalu baca source tersebut dan ambil data table tingkat partikulat di dan masukkan ke dalam
sebuah file json.

You might also like