Register Login
Internet / AI Technology University (ITU/AITU)





|

Top Links: >> 80. Technology >> Internet Technology Summit Program >> 3. Threads and Network >> 3.2. Network
Current Topic: 3.2.5. Http Access
You have a privilege to create a quiz (QnA) related to this subject and obtain creativity score...
Http Access or World Wide Web

Let us discuss even more exiting subject: Access to World Wide Web managed by Hypertext Transfer Protocol (HTTP).

Here is a brief overview of basic classes involved in HTTP access.

The java.net package includes URL and its associated classes providing a simplified interface to the World Wide Web (WWW) on the Internet.

The URL class represents a Uniform Resource Locator - a reference to an object on the World Wide Web.
This is a constant object, once it is created, its fields cannot be changed.
URL object can be created from a string like "http://aol.com".

After creating a URL object we can use its openStream() method to create an InputStream. Then we engage a usual scenario of using Input streams by creating a proper input stream for proper type of information.


For example to read a web page, which is html/text by its nature, we would create a BufferedReader stream out of InputStream.

The URLConnection class represents an active connection to an object pointed by URL.
The class constructor starts a URL connection to the specified URL.
The connect() method of this class provides the second phase of the process making finally the URL connection.
Was it clear so far? Highlight the text in question Or


This can be used for writing data to a specified (by URL) address.

In this scenario, we create URL object first.
Then we create a URLConnection object using the openConnection() method.
We prepare the connection for output using the setDoOutput() method.


Then we can get output stream for the connection and write data out.
The data format should be supported by HTTP protocol.


We can use the URLEncoder class that turns Strings of text into x-www-form-urlencoded format.


We can use the URLStreamHandler class for creating URL streams for particular protocol types.

Assignments:

1. Answer QnAs below.
2. Create 3 more QnAs and email as 3.2.5.HttpAccess.Your.Name.txt to dean@ituniversity.us
Questions and Answers (QnA): QnA1 | QnA2 | QnA3 | QnA4 | QnA5
We offer a fun way to share your experience and be rewarded.
You create a puzzle - quiz with a good question and several answers, one correct and several wrong ones.
The question as well as answers can include text, links, video.
This is your creation, completely up to your taste, humor, and of course your knowledge.
If there is an existing quiz above, you need first to solve the puzzles and evaluate the quality (at the bottom of every quiz).
After finishing the existing quiz you will be able to create your own. The best puzzles will be rewarded!
We invite you to create your own questions and answers (QnA) to increase your rank and win the Top Creativity Prize!

Topic Graph | Check Your Progress | Propose QnA | Have a question or comments for open discussion?

Have a suggestion? - shoot an email
Looking for something special? - Talk to AI
Read: IT of the future: AI and Semantic Cloud Architecture | Fixing Education
Do you want to move from theory to practice and become a magician? Learn and work with us at Internet Technology University (ITU) - JavaSchool.com.

Technology that we offer and How this works: English | Spanish | Russian | French

Internet Technology University | JavaSchool.com | Copyrights © Since 1997 | All Rights Reserved
Patents: US10956676, US7032006, US7774751, US7966093, US8051026, US8863234
Including conversational semantic decision support systems (CSDS) and bringing us closer to The message from 2040
Privacy Policy