Read-only access to these parts of a URL is provided by nine public methods: getFile(), getHost(), getPort(), getProtocol(), getRef(), getQuery(), getPath(), getUserlnfo(), and getAuthority(). Write a Java program which uses these methods to split URLS entered on the command line into their component parts.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question
Lab 02: Splitting a URL into pieces
URLS are composed of five pieces:
The scheme, also known as the protocol
The authority (may further be divided into the user info, the host, and the port)
The path
The fragment identifier, also known as the section or ref
The query string
Read-only access to these parts of a URL is provided by nine public methods: getFile(), getHost(),
getPort(), getProtocol(), getRef(), getQuery(), getPath(), getUserinfo(), and getAuthority().
Write a Java program which uses these methods to split URLS entered on the command line into their
component parts.
Transcribed Image Text:Lab 02: Splitting a URL into pieces URLS are composed of five pieces: The scheme, also known as the protocol The authority (may further be divided into the user info, the host, and the port) The path The fragment identifier, also known as the section or ref The query string Read-only access to these parts of a URL is provided by nine public methods: getFile(), getHost(), getPort(), getProtocol(), getRef(), getQuery(), getPath(), getUserinfo(), and getAuthority(). Write a Java program which uses these methods to split URLS entered on the command line into their component parts.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Form and its Elements
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT