20165336 2016-2017-2 "Java program Design" 9th Week Study summary Textbook study summary
1. URL class: The URL class is an important class in the java.net package, and the application that uses the URL to create the object is called the client program.
2, a URL object usually contains the most basic three parts of information: protocol, address, resources.
3, Uel construction method:public URL(String spec) throws MalformedURLException。
4. Read the resources in the URL: URL object invocation InputStream openStream()
.
5, Inetadress class: Address of the expression: domain name, IP address
6. Get the address of the host on the Internet:
- You can use the static method of the InetAddress class
getByName(String s);
- Gets a InetAddress object that contains the domain name and IP address of the host address that the object
- The information it contains is expressed in the following format:
www.sina.com.cn/202.108.37.40
7. Get the address of the local machine
You can use the static method of the InetAddress class Getlocalhost () to obtain a InetAddress object that contains the domain name and IP address of the local machine.
8. Socket:
- Client sockets
- ServerSocket object vs. Server-side sockets:
9, the use of multithreading technology: in order to prevent the blocking of threads, the server receives a client socket, it should start a dedicated service for the customer thread.
10. UDP Packets: Sending packets, receiving packets
11. Broadcast Data Report
12, Java Remote Call: Remote Object agent, RMI design details
Problems in code debugging and the resolution process
Issue 1: You must select Code to adjust code specification and refactoring when using idea, or you cannot debug.
Code Hosting
(run result of statistics.sh script)
20165336 2016-2017-2 "Java Programming" 9th Week study Summary