java技術(shù)(外文文獻翻譯).doc
約20頁DOC格式手機打開展開
java技術(shù)(外文文獻翻譯),網(wǎng)絡(luò)編程歷史上的網(wǎng)絡(luò)編程都傾向于困難、復(fù)雜,而且極易出錯。程序員必須掌握與網(wǎng)絡(luò)有關(guān)的大量細節(jié),有時甚至要對硬件有深刻的認(rèn)識。一般地,我們需要理解連網(wǎng)協(xié)議中不同的“層”(layer)。而且對于每個連網(wǎng)庫,一般都包含了數(shù)量眾多的函數(shù),分別涉及信息塊的連接、打包和拆包;這些塊的來回運輸;以及握手等等。這是一項令人痛苦的工作。...
![](http://img.queshao.com/images/pcgzh.gif)
![](http://preview.queshao.com/tobuy/206278.gif)
內(nèi)容介紹
此文檔由會員 wanli1988go 發(fā)布
網(wǎng)絡(luò)編程
歷史上的網(wǎng)絡(luò)編程都傾向于困難、復(fù)雜,而且極易出錯。
程序員必須掌握與網(wǎng)絡(luò)有關(guān)的大量細節(jié),有時甚至要對硬件有深刻的認(rèn)識。一般地,我們需要理解連網(wǎng)協(xié)議中不同的“層”(Layer)。而且對于每個連網(wǎng)庫,一般都包含了數(shù)量眾多的函數(shù),分別涉及信息塊的連接、打包和拆包;這些塊的來回運輸;以及握手等等。這是一項令人痛苦的工作。
Java最出色的一個地方就是它的“無痛苦連網(wǎng)”概念。有關(guān)連網(wǎng)的基層細節(jié)已被盡可能地提取出去,并隱藏在JVM以及Java的本機安裝系統(tǒng)里進行控制。我們使用的編程模型是一個文件的模型;事實上,網(wǎng)絡(luò)連接(一個“套接字”)已被封裝到系統(tǒng)對象里,所以可象對其他數(shù)據(jù)流那樣采用同樣的方法調(diào)用。除此以外,在我們處理另一個連網(wǎng)問題——同時控制多個網(wǎng)絡(luò)連接——的時候,Java內(nèi)建的多線程機制也是十分方便的。
Network programming
Historically, programming across multiple machines has been error-prone, difficult, and complex.
The programmer had to know many details about the network and sometimes even the hardware. You usually needed to understand the various “l(fā)ayers” of the networking protocol, and there were a lot of different functions in each different networking library concerned with connecting, packing, and unpacking blocks of information; shipping those blocks back and forth; and handshaking. It was a daunting task.
One of Java’s great strengths is painless networking. The Java network library designers have made it quite similar to reading and writing files, except that the “file” exists on a remote machine and the remote machine can decide exactly what it wants to do about the information you’re requesting or sending. As much as possible, the underlying details of networking have been abstracted away and taken care of within the JVM and local machine installation of Java. The programming model you use is that of a file; in fact, you actually wrap the network connection (a “socket”) with stream objects, so you end up using the same method calls as you do with all other streams. In addition, Java’s built-in multithreading is exceptionally handy when dealing with another networking issue: handling multiple connections at once.
歷史上的網(wǎng)絡(luò)編程都傾向于困難、復(fù)雜,而且極易出錯。
程序員必須掌握與網(wǎng)絡(luò)有關(guān)的大量細節(jié),有時甚至要對硬件有深刻的認(rèn)識。一般地,我們需要理解連網(wǎng)協(xié)議中不同的“層”(Layer)。而且對于每個連網(wǎng)庫,一般都包含了數(shù)量眾多的函數(shù),分別涉及信息塊的連接、打包和拆包;這些塊的來回運輸;以及握手等等。這是一項令人痛苦的工作。
Java最出色的一個地方就是它的“無痛苦連網(wǎng)”概念。有關(guān)連網(wǎng)的基層細節(jié)已被盡可能地提取出去,并隱藏在JVM以及Java的本機安裝系統(tǒng)里進行控制。我們使用的編程模型是一個文件的模型;事實上,網(wǎng)絡(luò)連接(一個“套接字”)已被封裝到系統(tǒng)對象里,所以可象對其他數(shù)據(jù)流那樣采用同樣的方法調(diào)用。除此以外,在我們處理另一個連網(wǎng)問題——同時控制多個網(wǎng)絡(luò)連接——的時候,Java內(nèi)建的多線程機制也是十分方便的。
Network programming
Historically, programming across multiple machines has been error-prone, difficult, and complex.
The programmer had to know many details about the network and sometimes even the hardware. You usually needed to understand the various “l(fā)ayers” of the networking protocol, and there were a lot of different functions in each different networking library concerned with connecting, packing, and unpacking blocks of information; shipping those blocks back and forth; and handshaking. It was a daunting task.
One of Java’s great strengths is painless networking. The Java network library designers have made it quite similar to reading and writing files, except that the “file” exists on a remote machine and the remote machine can decide exactly what it wants to do about the information you’re requesting or sending. As much as possible, the underlying details of networking have been abstracted away and taken care of within the JVM and local machine installation of Java. The programming model you use is that of a file; in fact, you actually wrap the network connection (a “socket”) with stream objects, so you end up using the same method calls as you do with all other streams. In addition, Java’s built-in multithreading is exceptionally handy when dealing with another networking issue: handling multiple connections at once.
TA們正在看...
- 軸承座設(shè)計cad圖.pdf
- 創(chuàng)意簡潔醫(yī)療醫(yī)藥行業(yè)工作匯報工作計劃.pdf
- 創(chuàng)意綠醫(yī)療醫(yī)藥行業(yè)工作總結(jié)通用模板.pdf
- 春季道路交通事故高發(fā)原因及預(yù)防對策探討.pdf
- 道路升級改造工程監(jiān)理招標(biāo)文件.pdf
- 分光分纖箱招標(biāo)技術(shù)規(guī)范書.pdf
- 服務(wù)顧問流程執(zhí)行檢查表(svw).pdf
- 工程部管理辦法_制度規(guī)范_工作范文_實用文檔.pdf
- 公路工程交工會議議程.pdf
- 公司中壓電力載波gprs信號通信延長設(shè)備技術(shù)規(guī)范.pdf