20165235 Qi Ying 2018-4 "java program design" Nineth Week study summary textbook learning content Summary URL class
UR
Class is java.ne
an important class in the T package, and the application that uses the URL
created object is called a client program.
A URL class creates a class with the following construction methods:public URL(String spec) throws MalformedURLException
URL
The object being created is a http
protocol that contains resources that are the default (home page)
A URL object can InputStream openStream()
return an input stream by calling a method that points to URL
the resource that the object contains.
Inetadress class
Internet
On the host there are two ways to represent the address, the domain name or the IP
address, the way to get the address :InetAdress
static methodgetByte(String s)
Set of bytes
The external program needs to access the native program through the port that the native program occupies.
When two programs need to communicate on the network, you can Socket
create a socket object by using the class and join together ( IP
a network socket is derived from the combination of port number and address)
The client's program uses the ocket
class to create a socket object that is responsible for connecting to the server.
Execute the Accept () 方法之后的程序会被阻塞。 多线程技术:服务端在接受到一个客户端的套接字后,就应该启动一个专门为该客户服务的线程。 ###### UDP数据报 套接字是基于
TCP 的网络通信 ###### 广播数据报 D类地址:相同D类地址的客户端可以享有服务器提供的资源。 要广播或接受广播就要让主机加入到同一个D类地址 ###### java远程调用
RMI 可以让一个虚拟机上的应用程序请求调用位于网络上另一端一个虚拟机上的对象。习惯称发出调用请求的虚拟机为(本地机)客户端。 创建远程对象的类必须实现
Remote ' interface.
Issues and resolution procedures when uploading your code
- Problem: Because the third experiment needs to modify the partner's code, this time in git code there is a merge conflict problem, so that the code can not
git push
upload.
- Workaround and steps: After referring to this blog---git merge conflict resolution, I merged the conflicting content:
git status
To view the current status
git add
Conflicting file names
git commit
(Note: no addition required -m“”
), you will enter an editor at this time vim
:
Ctrl+z
Exit to go, and thenrm ./MERGE_HEAD
- Then
git pull
you can.
Sentiment
Through this week's study and summary, the Java remote Call is not very understanding, the code is a bit complicated, so it seems too messy.
Learning progress Bar
|
lines of code (new/cumulative) |
Blog Volume (Add/accumulate) |
Learning Time (new/cumulative) |
Important Growth |
Goal |
5000 rows |
30 Articles |
400 hours |
|
First week |
31/31 |
1/1 |
20/20 |
The use of Git |
Second week |
373/404 |
2/3 |
18/38 |
Java Basic Data syntax |
Third week |
547/920 |
1/4 |
22/60 |
Classes and objects and packaging |
Week Four |
919/1839 |
2/6 |
30/80 |
Subclass and inheritance, interface and interface-oriented programming |
Week Five |
500/2300 |
3/9 |
20/100 |
Input and output streams and internal classes |
Week Six |
300/2600 |
1/10 |
25/125 |
Generic and aggregate frameworks, common utility classes |
Seventh Week |
447/3047 |
3/13 |
25/150 |
MySQL database and JDBC |
Eighth Week |
700/3826 |
3/16 |
25/175 |
The multithreading mechanism of Java |
Nineth Week |
700/4500 |
2/18 |
25/200 |
Java Network programming |
Resources
20165235 Qi Ying 2018-4 "Java Programming" Nineth Week study Summary