Java Network programming

Source: Internet
Author: User

1,java Network Programming:

Network programming is divided into TCP/IP and UDP;TCP is a reliable protocol, the latter is unreliable protocol, to achieve communication must have a unified port number;

The transport layer of TCP and UDP can receive traffic from multiple applications, identify them with a port number, and then send them to the Internet layer for processing;

At the same time, TCP and UDP receive packets from the Internet layer, differentiate them by port number, and then hand them over to different applications.

2,java XML parsing technology;

There are mainly tree-based DOM and event model-based sax

The former is to parse the entire document into a tree structure, through the API can be arbitrary access to each node, the advantage is easy to operate, the disadvantage is because to complete the document parsing,

So the memory footprint is large when parsing oversized documents.
The latter is a stream parsing that reads and parses the document sequentially and executes the action through a user-defined parse event handle when parsing to a specific element

, can be seen as a form of "push". In contrast to DOM, Sax has the advantage of being low in memory because it does not need to parse the document completely and is faster.

Design model of 3,java

There are 23 types of design patterns, which mainly explain the three kinds of factory design models, single-case design model, prototype design mode;

Java Network programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.