博客

  • 瘋狂JAVA講義

    瘋狂JAVA講義(作者 王剛)

      從2000年至今,Java語言一直是應用最廣的開發語言,並擁有最廣泛的開發人群。如今,Java已經不再簡單地是一門語言,它更像一個完整的體系,一個系統的開發平臺。更甚至,它被延伸成一種開源精神。

      本書深入介紹了Java程式設計的相關方面,全書內容覆蓋了Java的基本語法結構、Java的物件導向特徵、Java集合框架體系、Java泛型、異常處理、Java GUI程式設計、JDBC資料庫程式設計、Java注釋、Java的IO流體系、Java多執行緒程式設計、Java網路通信程式設計和Java反射機制。共覆蓋了java.awt、java.lang、java.io和java.nio、java.sql、java.text、java.util、javax.swing包下絕大部分類和介面。

      本書並不單純從知識角度來講解Java,而是從解決問題的角度來介紹Java語言,所以本書中介紹了大量實用案例開發:五子棋遊戲、梭哈遊戲、仿QQ的遊戲大廳、MySQL企業管理器、仿EditPlus的文字編輯器、多執行緒、中斷點下載工具、Spring框架的IoC容器……這些案例既能讓讀者鞏固每章的知識,又可以讓讀者學以致用、激發程式設計自豪感,進而引爆內心的程式設計激情。本書光碟裡包含書中所有示例的代碼,如果讀者希望獲得課後練習的程式碼,請自行登錄http://www.leegang.org網站下載。

    本書為所有打算深入掌握Java程式設計的讀者而編寫,適合各種層次的Java學習者和工作者閱讀,也適合作為大學教育、培訓機構的Java教材。但如果只是想簡單涉獵Java,則本書過於龐大,不適合閱讀。

    本書目錄

    第1章 java概述
     1.1 java語言的發展簡史
     1.2 java的競爭對手及各自優勢
      1.2.1 c#簡介和優勢
      1.2.2 ruby簡介和優勢
      1.2.3 python的簡介和優勢
     1.3 java程式運行機制
      1.3.1 高階語言的運行機制
      1.3.2 java程式的運行機制和jvm
     1.4 開發java的準備
      1.4.1 安裝jdk
     學生提問:不是說jvm是運行java程式的虛擬機器嗎?那jre和jvm的關係是怎樣的呢?
     學生提問:為什麼不安裝公共jre系統呢?
      1.4.2 設置path環境變數
     學生提問:為什麼選擇設置使用者變數,使用者變數和系統變數有什麼區別呢?
     1.5 第一個java程式
      1.5.1 編輯java原始程式碼
      1.5.2 編譯java程式
     學生提問:當我們使用編譯c程式時,不僅需要指定存放目的檔案的位置,也需要指定目的檔案的檔案名,這裡使用javac編譯java程式時怎麼不需要指定目的檔案的檔案名呢?
      1.5.3 運行java程式
    .  1.5.4 根據classpath環境變數定位類
     1.6 java程式的基本規則
      1.6.1 java程式的組織形式
      1.6.2 java原始檔案的命名規則
      1.6.3 初學者容易犯的錯誤
     1.7 垃圾回收機制
     1.8 何時開始使用ide工具
     學生提問:老師,我想學習java程式設計,到底是學習eclipse好呢,還是學習jbuilder好呢?
     1.9 本章小結
     本章練習
    第2章 理解物件導向
     2.1 物件導向
      2.1.1 結構化程式設計簡介
      2.1.2 程式的三種基本結構
      2.1.3 物件導向程式設計簡介
      2.1.4 物件導向的基本特徵
     2.2 uml(統一模組化語言)介紹
      2.2.1 用例圖
      2.2.2 類圖
      2.2.3 組件圖
      2.2.4 部署圖
      2.2.5 順序圖
      2.2.6 活動圖
      2.2.7 狀態機圖
     2.3 java的物件導向特徵
      2.3.1 一切都是物件
      2.3.2 類和對象
     2.4 本章小結
    第3章 資料類型和運算子
     3.1 注釋
      3.1.1 單行注釋和多行注釋
      3.1.2 文檔注釋
     學生提問:api文檔是什麼?
     學生提問:為什麼要掌握查看api文檔的方法?
     3.2 識別字和關鍵字
      3.2.1 分隔符號
      3.2.2 識別字規則
      3.2.3 java關鍵字
     3.3 資料類型分類
     3.4 基底資料型別
      3.4.1 整型
      3.4.2 字元型
      3.4.3 浮點型
      3.4.4 布林型
     3.5 基本類型的類型轉換
      3.5.1 自動類型轉換
      3.5.2 強制類型轉化
      3.5.3 運算式類型的自動提升
     3.6 直接量
      3.6.1 直接量的類型
      3.6.2 直接量的賦值
     3.7 運算子
      3.7.1 算術運算子
      3.7.2 設定運算子
      3.7.3 位運算子
      3.7.4 擴展後的設定運算子
      3.7.5 比較運算子
     學生提問:java為什麼要對這些資料進行緩存呢?
      3.7.6 邏輯運算子
      3.7.7 三目運算子
      3.7.8 運算子的結合性和優先順序
     3.8 本章小結
     本章練習
    第4章 流程控制和陣列
     4.1 順序結構
     4.2 分支結構
      4.2.1 if條件陳述式
      4.2.2 switch分支語句
     4.3 迴圈結構
      4.3.1 while迴圈語句
      4.3.2 do while迴圈語句
      4.3.3 for迴圈
      4.3.4 嵌套迴圈
     4.4 控制迴圈結構
      4.4.1 使用break結束迴圈
      4.4.2 使用continue結束本次迴圈
      4.4.3 使用return結束方法
     4.5 陣列類型
      4.5.1 理解陣列:陣列也是一種類型
     學生提問:int[]是一種類型嗎?怎麼使用這種類型呢?
      4.5.2 定義陣列
      4.5.3 陣列的初始化
     學生提問:能不能只分配記憶體空間,不賦初始值呢?
      4.5.4 使用陣列
     學生提問:為什麼要我記住這些異常資訊?
      4.5.5 jdk1.5提供了foreach迴圈
     4.6 深入陣列
      4.6.1 記憶體中的陣列
     學生提問:為什麼有棧記憶體和堆記憶體之分?
      4.6.2 基本類型陣列的初始化
      4.6.3 參考類型陣列的初始化
      4.6.4 沒有多維陣列
     學生提問:我是否可以讓圖4.13中灰色覆蓋的陣列元素再次指向另一個陣列?這樣不可以擴展成三維陣列嗎?甚至擴展到更多維的陣列?
      4.6.5 運算元組的工具類
      4.6.6 陣列的應用舉例
     4.7 本章小結
     本章練習
    第5章 物件導向(上)
     5.1 類和對象
      5.1.1 定義類
     學生提問:構造器不是沒有返回值嗎?為什麼不能用void修飾呢?
      5.1.2 物件的產生和使用
      5.1.3 對象、引用和指標
      5.1.4 對象的this引用
     5.2 方法詳解
      5.2.1 方法的所屬性
      5.2.2 方法的參數傳遞機制
      5.2.3 形參長度可變的方法
      5.2.4 遞迴方法
      5.2.5 方法重載
     學生提問:為什麼方法的返回數值型別不能用於區分重載的方法?
     5.3 成員變數和區域變數
      5.3.1 成員變數和區域變數
      5.3.2 成員變數的初始化和記憶體中的運行機制
      5.3.3 區域變數的初始化和記憶體中的運行機制
      5.3.4 變數的使用規則
     5.4 隱藏和封裝
      5.4.1 理解封裝
      5.4.2 使用存取控制符
      5.4.3 package和import
      5.4.4 java的常用包
     5.5 深入構造器
      5.5.1 使用構造器執行初始化
     學生提問:構造器是創建java對象的途徑,是不是說構造器完全負責創建java對象?
      5.5.2 構造器的重載
     學生提問:為什麼要用this來調用另一個重載的構造器?我把另一個構造器裡的代碼複製、粘貼到這個構造器裡不就可以了嗎?
     5.6 類的繼承
      5.6.1 繼承的特點
      5.6.2 重寫父類的方法
      5.6.3 父類實例的super引用
     學生提問:我們只是創建了一個ostrich物件時,哪來的bird物件?
      5.6.4 調用父類構造器
     學生提問:為什麼我創建java物件時從未感覺到java.lang.object的構造器被調用過?
     5.7 多態
      5.7.1 多態性
      5.7.2 引用變數的強制類型轉換
      5.7.3 instanceof運算子
     5.8 繼承與組合
      5.8.1 使用繼承的注意點
      5.8.2 利用組合實現複用
     學生提問:使用組合關係來實現複用時,需要創建兩個animal物件,是不是意味著使用組合關係時系統開銷更大?
     5.9 初始化塊
      5.9.1 使用初始化塊
      5.9.2 初始化塊和構造器
      5.9.3 靜態初始化塊
     5.10 本章小結
     本章練習
    第6章 物件導向(下)
     6.1 基底資料型別的包裝類
     6.2 處理物件
      6.2.1 列印物件和tostring方法
      6.2.2 ==和equals比較運算子
     6.3 類成員
      6.3.1 理解類成員
      6.3.2 單例(singleton)類
     6.4 final修飾符
      6.4.1 final變數
      6.4.2 final方法
      6.4.3 final類
      6.4.4 不可變類
      6.4.5 緩存實例的不可變類
     6.5 抽象類別
      6.5.1 抽象方法和抽象類別
      6.5.2 抽象類別的作用
     6.6 更徹底的抽象:介面
      6.6.1 介面的概念
      6.6.2 介面的定義
      6.6.3 介面的繼承
      6.6.4 使用介面
      6.6.5 介面和抽象類別
      6.6.6 面向介面程式設計
     6.7 內部類
      6.7.1 非靜態內部類
     學生提問:非靜態內部類物件和外部類物件的關係是怎樣的?
      6.7.2 靜態內部類
     學生提問:為什麼靜態內部類實例方法也不能訪問外部類的實例屬性呢?
     學生提問:介面裡是否能定義內部介面?
      6.7.3 使用內部類
     學生提問:既然內部類是外部類的成員,是否可以為外部類定義子類,在子類中再定義一個內部類來重寫其父類中的內部類?
      6.7.4 局部內部類
      6.7.5 匿名內部類
      6.7.6 閉包(closure)和回檔
     6.8 枚舉類
      6.8.1 手動實現枚舉類
      6.8.2 枚舉類入門
      6.8.3 枚舉類的屬性、方法和構造器
      6.8.4 實現介面的枚舉類
      6.8.5 包含抽象方法的枚舉類
     6.9 對象與垃圾回收
      6.9.1 物件在記憶體中的狀態
      6.9.2 強制垃圾回收
      6.9.3 finalize方法
      6.9.4 對象的軟、弱和虛引用
      6.10 修飾符的適用範圍
     6.11 使用jar檔
      6.11.1 jar命令詳解
      6.11.2 創建可執行的jar包
      6.11.3 關於jar包的技巧
     6.12 本章小結
     本章練習
    第7章 java集合
     7.1 java集合概述
     7.2 collection和iterator介面
      7.2.1 使用iterator介面遍歷集合元素
      7.2.2 使用foreach迴圈遍歷集合元素
     7.3 set介面
      7.3.1 hashset類
     學生提問:hashcode方法對於hashset的作用是什麼?
      7.3.2 treeset類
      7.3.3 enumset類
     7.4 list介面
      7.4.1 list介面和listiterator介面
      7.4.2 arraylist和vector實現類
      7.4.3 固定長度的list
     7.5 queue介面
      7.5.1 linkedlist實現類
      7.5.2 priorityqueue實現類
     7.6 map
      7.6.1 hashmap和hashtable實現類
      7.6.2 sortedmap介面和treemap實現類
      7.6.3 weakhashmap實現類
      7.6.4 identityhashmap實現類
      7.6.5 enummap實現類
     7.7 hashset和hashmap的性能選項
     7.8 操作集合的工具類:collections
      7.8.1 排序操作
      7.8.2 查找,替換操作
      7.8.3 同步控制
      7.8.4 設置不可變集合
     7.9 煩瑣的介面:enumeration
     7.10 本章小結
     本章練習
    第8章 泛型
     8.1 泛型入門
      8.1.1 編譯時不檢查類型的異常
      8.1.2 手動實現編譯時檢查類型
      8.1.3 使用泛型
     8.2 深入泛型
      8.2.1 定義泛型介面、類
      8.2.2 從泛型類派生子類
      8.2.3 並不存在泛型類
     8.3 類型萬用字元
      8.3.1 使用類型萬用字元
      8.3.2 設定類型萬用字元的上限
      8.3.3 設定類型形參的上限
     8.4 泛型方法
      8.4.1 定義泛型方法
      8.4.2 泛型方法和類型萬用字元的區別
      8.4.3 設定萬用字元的下限
      8.4.4 泛型方法與方法重載
     8.5 擦除和轉換
     8.6 泛型與陣列
     8.7 本章小結
    第9章 與運行環境交互
     9.1 與用戶互動
      9.1.1 運行java程式的參數
      9.1.2 使用scanner獲取鍵盤輸入
      9.1.3 使用bufferedreader獲取鍵盤輸入
     9.2 系統相關
      9.2.1 system類
      9.2.2 runtime類
     9.3 常用類
      9.3.1 object類
      9.3.2 string、stringbuffer和stringbuilder類
      9.3.3 math類
      9.3.4 random類
      9.3.5 bigdecimal類
     9.4 處理日期的類
      9.4.1 date類
      9.4.2 calendar類
      9.4.3 timezone類
     9.5 規則運算式
      9.5.1 創建規則運算式
      9.5.2 使用規則運算式
     9.6 程式國際化
      9.6.1 java國際化的思路
      9.6.2 java支援的語言和國家
      9.6.3 完成程式國際化
      9.6.4 使用messageformat處理包含預留位置的字串
      9.6.5 使用類檔代替資源檔
      9.6.6 使用numberformat格式化數位
      9.6.7 使用dateformat格式化日期
     9.7 本章小結
     本章練習
    第10章 異常處理
     10.1 異常概述
     10.2 異常處理機制
      10.2.1 使用try…catch捕獲異常
      10.2.2 異常類的繼承體系
      10.2.3 訪問異常資訊
      10.2.4 使用finally回收資源
      10.2.5 異常處理的嵌套
     10.3 checked異常和runtime異常體系
      10.3.1 使用throws聲明拋出異常
     10.4 使用throw拋出異常
      10.4.1 拋出異常
      10.4.2 自訂異常類
      10.4.3 catch和throw同時使用
      10.4.4 異常鏈
     10.5 java的異常跟蹤棧
     10.6 異常處理規則
      10.6.1 不要過度使用異常
      10.6.2 不要使用過於龐大的try塊
      10.6.3 避免使用catch all語句
      10.6.4 不要忽略捕獲到的異常
     10.7 本章小結
     本章練習
    第11章 awt程式設計
     11.1 gui(圖形化使用者介面)和awt
     11.2 awt容器
     11.3 佈局管理器
      11.3.1 flowlayout佈局管理器
      11.3.2 borderlayout佈局管理器
     學生提問:borderlayout最多只能放置5個組件嗎?那它還有什麼作用?
      11.3.3 gridlayout佈局管理器
      11.3.4 gridbaglayout佈局管理器
      11.3.5 cardlayout佈局管理器
      11.3.6 絕對定位
      11.3.7 boxlayout佈局管理器
     學生提問:圖11.15和圖11.16顯示的所有按鈕都緊挨在一起,如果希望像flowlayout、gridlayout等佈局管理器指定組件的間距該怎麼辦?
     11.4 awt 常用組件
      11.4.1 基本組件
      11.4.2 對話方塊
     11.5 事件處理
      11.5.1 java事件模型的流程
      11.5.2 事件和事件監聽器
      11.5.3 事件適配器
      11.5.4 事件監聽器的實現形式
     11.6 awt的菜單
      11.6.1 功能表條、功能表和功能表項目
      11.6.2 右鍵菜單
     學生提問:為什麼即使我沒有給多行文本域編寫右鍵菜單,但當我在多行文本域上按一下右鍵時一樣會彈出右鍵功能表?
     11.7 在awt中繪圖
      11.7.1 畫圖的實現原理
      11.7.2 使用graphics類
     11.8 處理點陣圖
      11.8.1 image抽象類別和bufferedimage實現類
      11.8.2 使用imageio輸入/輸出點陣圖
     11.9 剪貼板
      11.9.1 資料傳遞的類和介面
      11.9.2 傳遞文本
      11.9.3 使用系統剪貼板傳遞圖像
      11.9.4 使用本地剪貼板來傳遞物件引用
      11.9.5 通過系統剪貼板傳遞java物件
      11.10 本章小結
     本章練習
    第12章 swing程式設計
     12.1 swing概述
     12.2 swing基本組件的用法
      12.2.1 swing元件層次
      12.2.2 awt組件的swing實現
     學生提問:為什麼按一下swing多行文本域時不是彈出像awt多行文本域中的右鍵菜單?
      12.2.3 使用jtoolbar創建工具條
      12.2.4 使用jcolorchooser和jfilechooser
      12.2.5 使用joptionpane
     12.3 swing中的特殊容器
      12.3.1 使用jsplitpane
      12.3.2 使用jtabbedpane
      12.3.3 使用jlayeredpane、jdesktoppane和jinternalframe
     12.4 swing拖放功能
      12.4.1 拖放目標
      12.4.2 拖放源
      12.4.3 簡化的拖放操作
     12.5 applet和japplet
      12.5.1 applet簡介及其安全性
      12.5.2 開發applet類
      12.5.3 使用html頁面裝載applet
      12.5.4 appletviewer簡介
      12.5.5 applet的生命週期和動畫機制
     學生提問:程式中重寫paint方法時繪製了一個字串,但圖12.28上則繪製出了如此之多的字串,這是為什麼呢?
      12.5.6 使用applet創建音樂播放機
     12.6 使用jprogressbar、progressmonitor和boundedrangemodel創建進度條
      12.6.1 創建進度條
      12.6.2 創建進度對話方塊
     12.7 使用jslider和boundedrangemodel創建滑動條
     12.8 使用jspinner和spinnermodel創建微調控制器
     12.9 使用jlist、jcombobox創建清單方塊
      12.9.1 簡單清單方塊
      12.9.2 不強制存儲清單項的listmodel和comboboxmodel
      12.9.3 強制存儲清單項的defaultlistmodel和defaultcomboboxmodel
     學生提問:為什麼jcombobox提供了添加、刪除列表項目的方法?而jlist沒有提供添加、刪除列表項的方法呢?
      12.9.4 使用listcellrenderer改變列表項外觀
     12.10 使用jtree和treemodel創建樹
      12.10.1 創建樹
      12.10.2 拖動、編輯樹節點
      12.10.3 監聽節點事件
      12.10.4 使用treecellrendering改變節點外觀
     12.11 使用jtable和tablemodel創建表格
      12.11.1 創建jtable
     學生提問:我們指定的表格資料、表格列標題都是object類型的陣列,jtable如何顯示這些object物件?
      12.11.2 tablemodel和監聽器
      12.11.3 tablecolumnmodel和監聽器
      12.11.4 實現排序
      12.11.5 繪製儲存格內容
      12.11.6 編輯儲存格內容
     12.12 使用jformattedtextfield和jtextpane創建格式文本
      12.12.1 監聽document的改變
      12.12.2 使用jpasswordfield
      12.12.3 使用jformattedtextfield
      12.12.4 使用jeditorpane
      12.12.5 使用jtextpane
     12.13 本章小結
     本章練習
    第13章 jdbc程式設計
     13.1 jdbc基礎
      13.1.1 jdbc簡介
      13.1.2 jdbc驅動程式類型
     13.2 sql語法介紹
      13.2.1 安裝資料庫
      13.2.2 關聯式資料庫基本概念和mysql基本命令
      13.2.3 sql語句基礎
      13.2.4 ddl語句
      13.2.5 dml語句語法
      13.2.6 select語句和sql函數
      13.2.7 分組和組函數
      13.2.8 多表連接查詢和子查詢
     13.3 jdbc的典型用法
      13.3.1 jdbc常用介面和類簡介
      13.3.2 jdbc程式設計步驟
     學生提問:前面給出的僅是mysql和oracle兩種資料庫的驅動,我看不出驅動類字串有什麼規律啊。如果我希望使用其他資料庫,我怎麼用其他資料庫的驅動類呢?
     13.4 執行sql語句的方式
      13.4.1 使用executeupdate執行ddl和dml語句
      13.4.2 使用execute方法執行sql語句
      13.4.3 使用preparedstatement執行sql語句
      13.4.4 使用callablestatement調用存儲過程
     13.5 管理結果集
      13.5.1 可滾動、可更新的結果集
      13.5.2 處理blob類型資料
      13.5.3 使用resultsetmetadata分析結果集
     13.6 交易處理
      13.6.1 事務的概念和mysql事務支援
      13.6.2 jdbc的事務支援
      13.6.3 批量更新
     13.7 分析資料庫資訊
      13.7.1 使用databasemetadata分析資料庫資訊
      13.7.2 使用系統表分析資料庫資訊
      13.7.3 選擇合適的分析方式
     13.8 使用連接池管理連接
     13.9 本章小結
     本章練習
    第14章 annotation(注釋)
     14.1 基本annotation
      14.1.1 限定重寫父類方法:@override
      14.1.2 標示已過時:@deprecated 676
      14.1.3 抑制編譯器警告:@suppresswarnings
     14.2 自訂annotation
      14.2.1 定義annotation
      14.2.2 提取annotation的資訊
      14.2.3 使用annotation的例子
     14.3 jdk的元annotation
      14.3.1 使用@retention
      14.3.2 使用@target
      14.3.3 使用@documented
      14.3.4 使用@inherited
     14.4 使用apt處理annotation
     14.5 本章小結
    第15章 輸入/輸出
     15.1 file類
      15.1.1 訪問檔和目錄
      15.1.2 文件篩檢程式
     15.2 理解java的io流
      15.2.1 流的分類
      15.2.2 流的概念模型
     15.3 位元組流和字元流
      15.3.1 inputstream和reader
      15.3.2 outputstream和writer
     15.4 輸入/輸出流體系
      15.4.1 處理流的用法
      15.4.2 輸入/輸出流體系
      15.4.3 轉換流
     學生提問:怎麼沒有把字元流轉換成位元組流的轉換流呢?
      15.4.4 推回輸入流
     15.5 重定向標準輸入/輸出
     15.6 java虛擬機器讀寫其他進程的資料
     15.7 randomaccessfile
     15.8 物件序列化
      15.8.1 序列化的含義和意義
      15.8.2 使用物件流實現序列化
      15.8.3 物件引用的序列化
      15.8.4 自訂序列化
      15.8.5 另一種自訂序列化機制
      15.8.6 版本
     15.9 java新io
      15.9.1 java新io概述
      15.9.2 使用buffer
      15.9.3 使用channel
      15.9.4 編碼集和charset
      15.9.5 文件鎖
     15.10 本章小結
     本章練習
    第16章 多執行緒
     16.1 執行緒概述
      16.1.1 執行緒和進程
      16.1.2 多執行緒的優勢
     16.2 執行緒的創建和啟動
      16.2.1 繼承thread類創建執行緒類
      16.2.2 實現runnable介面創建執行緒類
      16.2.3 兩種方式所創建執行緒的對比
     16.3 執行緒的生命週期
      16.3.1 新建和就緒狀態
      16.3.2 運行和阻塞狀態
      16.3.3 執行緒死亡
     16.4 控制執行緒
      16.4.1 join執行緒
      16.4.2 後臺執行緒
      16.4.3 執行緒睡眠:sleep
      16.4.4 執行緒讓步:yield
      16.4.5 改變執行緒優先順序
     16.5 執行緒的同步
      16.5.1 執行緒安全問題
      16.5.2 同步代碼塊
      16.5.3 同步方法
      16.5.4 釋放同步監視器的鎖定
      16.5.5 同步鎖(lock)
      16.5.6 鎖死
     16.6 執行緒通信
      16.6.1 執行緒的協調運行
      16.6.2 使用條件變數控制協調
      16.6.3 使用管道流
     16.7 執行緒組和未處理的異常
     16.8 callable和future
     16.9 執行緒池
     16.10 執行緒相關類
      16.10.1 threadlocal類
      16.10.2 包裝執行緒不安全的集合
      16.10.3 執行緒安全的集合類
      16.11 本章小結
    第17章 網路程式設計
     17.1 網路程式設計的基礎知識
      17.1.1 網路基礎知識
      17.1.2 ip位址和埠號
     17.2 java的基本網路支援
      17.2.1 使用inetaddress
      17.2.2 使用urldecoder和urlencoder
      17.2.3 使用url和urlconnection
     17.3 基於tcp協定的網路程式設計
      17.3.1 tcp協議基礎
      17.3.2 使用servletsocket創建tcp伺服器端
      17.3.3 使用socket進行通信
      17.3.4 加入多執行緒
      17.3.5 記錄使用者資訊
      17.3.6 使用nio實現非阻塞socket通信
     17.4 基於udp協定的網路程式設計
      17.4.1 udp協議基礎
      17.4.2 使用datagramsocket發送、接收資料
      17.4.3 使用multicastsocket實現多點廣播
     17.5 使用代理伺服器
      17.5.1 直接使用proxy創建連接
      17.5.2 使用proxyselector選擇代理伺服器
     17.6 本章小結
     本章練習
    第18章 類載入和反射
     18.1 類的載入、連接和初始化
      18.1.1 jvm和類
      18.1.2 類的載入
      18.1.3 類的連接
      18.1.4 類的初始化
      18.1.5 類初始化的時機
     18.2 類載入器
      18.2.1 類載入器簡介
      18.2.2 類載入機制
      18.2.3 創建並使用自訂的類載入器
      18.2.4 urlclassloader類
     18.3 通過反射查看類資訊
      18.3.1 獲得class對象
      18.3.2 從class中獲取資訊
     18.4 使用反射生成並操作物件
      18.4.1 創建對象
      18.4.2 調用方法
      18.4.3 訪問屬性值
      18.4.4 運算元組
     18.5 使用反射生成jdk動態代理
      18.5.1 使用proxy和invocationhandler創建動態代理
      18.5.2 動態代理和aop
     18.6 反射和泛型
      18.6.1 泛型和class類
      18.6.2 使用反射來獲取泛型資訊
     18.7 本章小結
     本章練習
    上善若水——兼談我的創作理念

    點擊下載: 瘋狂JAVA講義

  • 精通Windows Server 2008命令列與PowerShell

    精通Windows Server 2008命令列與PowerShell

    內容簡介:

    本書全面地介紹了Windows Server 2008命令列、PowerShell和腳本的使用,包括檔和資料夾的管理、磁片管理、系統管理、活動目錄管理、網路管理、網路服務管理、系統診斷、故障恢復、系統安全、批次處理和設定檔,PowerShell等一系列的命令列管理方式以及腳本。本書側重於系統、服務、網路和安全管理應用,不僅介紹了各個命令的語法和參數,還列舉了大量實例,能夠迅速提高讀者的動手能力和技術水準。

    本書適合於從事系統管理和網路管理的專業人員,同時適合於電腦及相關專業的學生,也可作為電腦培訓學校的教材。

    (更多…)

  • Core Web Application Development with PHP and MySQL(英文版CHM)

    Core Web Application Development with PHP and MySQL(英文版CHM)

    OverView

    The programmers guide to building robust web applications with PHP and MySQL

    This is a comprehensive, practical guide for programmers who want to develop production-quality, database-enabled web applications with PHP and MySQL. Long-time developer Marc Wandschneider systematically addresses the entire process: not only coding, but also upfront application, user interface and database design, PLUS security, testing, and more.

    Youll walk through building three applications from start to finish: a calendaring system, a weblog engine, and an e-commerce store. Along the way, youll master essential strategies for creating robust web database applications and learn how to avoid the common pitfalls that trip up many developers moving to PHP and MySQL.

    (更多…)

  • Sams Teach Yourself Windows Server 2008 in 24 Hours

    Sams Teach Yourself Windows Server 2008 in 24 Hours

    In just 24 lessons of one hour or less, you will be able to install and configure Microsoft Windows Server 2008 and its various services for any size network. Using a straightforward, step-by-step approach, each lesson builds on the previous ones, enabling you to learn the essentials of Windows Server® 2008 from the ground up.

    (更多…)

  • Microsoft C# Windows 程式設計(中文版)

    Microsoft C# Windows 程式設計(中文版)

    微軟圖書必為精品

    目錄

    第一章 控制台本身
    1.1 C#版本
    1.2 程式分析
    1.3 C#名稱空間
    1.4 控制台I/O
    1.5 C#資料類型
    1.6 運算式和操作符
    1.7 條件和迴圈
    1.8 對象的跳躍
    1.9 使用C#的關鍵特性進行程式設計
    1.10 靜態方法
    1.11 異常處理
    1.12 拋出異常
    1.13 獲取和設置屬性
    1.14 構造函數
    1.15 實例和繼承
    1.16 更宏偉的藍圖
    1.17 命名約定
    1.18 幾句題外話
    第二章 歡迎使用Windows Forms
    第三章 基本結構
    第四章 文本輸出中的練習
    第五章 直線、曲線和區域填滿
    第六章 接近鍵盤
    第七章 頁面和變換
    第八章 滑鼠的歷史
    第九章 文本和字體
    第十章 計時器和時間
    第十一章 圖像和點陣圖
    第十二章 按鈕、標籤和捲軸
    第十三章 貝茲曲線和其他樣條曲線
    第十四章 菜單
    第十五章 路徑、區域和裁剪
    第十六章 對話方塊
    第十七章 畫刷和畫筆
    第十八章 文字方塊、清單方塊和旋轉框
    第十九章 字體
    第二十章 工具列和狀態列
    第二十一章 列印
    第二十二章 樹形視圖和列表視圖 
    第二十三章 中繼檔
    第二十四章 剪切、拖動和放置

    附錄A 文件和流
    A.1 最基本的文件I/O類
    A.2 FileStream的屬性和方法
    A.3 FileStream的問題
    A.4 其他流類型
    A.5 讀寫文本
    A.6 二進位檔案I/O
    A.7 Environment類
    A.8 檔案名和路徑名解析
    A.9 並列的類
    A.10 使用目錄
    A.11 檔操作和資訊
    附錄B 數學類
    B.1 數數值型別
    B.2 檢查整數溢出
    B.3 小數類型
    B.4 浮點數的無窮大和無窮小
    B.5 Math類
    B.6 浮點數的餘數
    B.7 冪和對數
    B.8 三角函數
    附錄C 字串理論
    C.1 char類型
    C.2 String的構造函數和屬性
    C.3 複製字串
    C.4 轉換字串
    C.5 連接字串
    C.6 比較字串
    C.7 搜索字串
    C.8 去首尾空格和填補字元串
    C.9 字串操作
    C.10 格式化字串
    C.11 陣列排序和搜索
    C.12 StringBuilder類

    點擊下載:  Microsoft C# Windows 程式設計(中文版)

  • JavaScript 2.0:The Complete Reference, Second Edition(CHM)

    JavaScript 2.0:The Complete Reference, Second Edition(CHM)
    本書目錄:

    JavaScript 2.0—The Complete Reference, Second Edition  
    Part I – Introduction
    Chapter 1 – Introduction to JavaScript
    Chapter 2 – JavaScript Core Features—Overview
    Part II – Core Language
    Chapter 3 – Data Types and Variables
    Chapter 4 – Operators, Expressions, and Statements

    (更多…)

  • 《企業虛擬化實戰—VMware篇》

    《企業虛擬化實戰—VMware篇》本書深入淺出地介紹了電腦虛擬化技術及其應用實例。

    全書共分7章和7個附錄,內容包括:虛擬化基礎概念,虛擬化技術初探,企業級虛擬化解決方案概覽,企業級虛擬化解決方案實戰,企業級虛擬化解決方案進階應用。附錄內容包括對esx3i的安裝和配置,vi中常用的命令工具以及免費工具和網路資源。

    本書適用於關注虛擬化技術的企業it管理員以及系統集成商的技術人員和it技術愛好者。此外,本書對承擔企業cio、cto角色的讀者也具有一定的參考價值。

    (更多…)

  • The Linux Networking Architecture

    The Linux Networking Architecture

    This unique Linux networking tutorial/reference by experts provides readers with a practical overview and understanding of the implementation of networking protocols in the Linux kernel. The book shows how networking behavior and protocols can be implemented within the Linux operating system. Introduction to the Linux kernel, mainly focusing on the upcoming kernel version 2.4 but also valid for version 2.2 kernels. The organization of the book follows the TCP/IP layering model, beginning with the kernel’s network device drivers, continuing with link-layer protocols such as PPP, and finally giving a description of all core protocols of the TCP/IP protocol family. Additional supplementary protocols such as RSVP, IP Security, and Mobile IP are also covered. For anyone interested in Linux or networking, including network programmers and administrators.

    Copyright ii
         Preface xiii
            Organization of this Book xiv
            Additional Sources of Information xv
            Conventions Used in this Book xvi
            Acknowledgments xvii
         Part I:  The Linux Kernel 1
            Chapter 1.  Motivation 3
            Section 1.1.  The Linux Operating System 4
            Section 1.2.  What is Linux? 5
            Section 1.3.  Reasons for Using Linux 6
            Chapter 2.  The Kernel Structure 9
            Section 2.1.  Monolithic Architectures and Microkernels 11
            Section 2.2.  Activities in the Linux Kernel 12
            Section 2.3.  Locking—Atomic Operations 17
            Section 2.4.  Kernel Modules 23
            Section 2.5.  Device Drivers 29
            Section 2.6.  Memory Management in the Kernel 31
            Section 2.7.  Timing in the Linux Kernel 35
            Section 2.8.  The Proc File System 40
            Section 2.9.  Versioning 43
         Part II:  Architecture of Network Implementation 45
            Chapter 3.  The Architecture of Communication Systems 47
            Section 3.1.  Layer-Based Communication Models 47
            Section 3.2.  Services and Protocols 52
            Chapter 4.  Managing Network Packets in the Kernel 55
            Section 4.1.  Socket Buffers 55
            Section 4.2.  Socket-Buffer Queues 66
            Chapter 5.  Network Devices 71
            Section 5.1.  The net_device Interface 73
            Section 5.2.  Managing Network Devices 82
            Section 5.3.  Network Drivers 92
         Part III:  Layer I + II—Medium Access and Logical Link Layer 115
            Chapter 6.  Introduction to the Data-Link Layer 117
            Section 6.1.  Structure of the Data-Link Layer 117
            Section 6.2.  Processes on the Data-Link Layer 119
            Section 6.3.  Managing Layer-3 Protocols 127
            Chapter 7.  The Serial-Line Internet Protocol (SLIP) 132
            Section 7.1.  Introduction 132
            Section 7.2.  Slip Implementation in the Linux Kernel 134
            Chapter 8.  The Point-to-Point Protocol (PPP) 145
            Section 8.1.  Introduction 145
            Section 8.2.  PPP Configuration in Linux 148
            Section 8.3.  PPP Implementation in the Linux Kernel 150
            Section 8.4.  Implementing the PPP Daemon 158
            Chapter 9.  PPP over Ethernet 161
            Section 9.1.  Introduction 161
            Section 9.2.  PPPOE Specification in RFC 2516 161
            Section 9.3.  Implementation in the User Space 163
            Section 9.4.  Implementation in the Linux Kernel 164
            Chapter 10.  Asynchronous Transfer Mode—ATM 168
            Section 10.1.  Introduction 168
            Section 10.2.  Implementing ATM in Linux 169
            Section 10.3.  Configuration 177
            Chapter 11.  Bluetooth in Linux 179
            Section 11.1.  Host Controller Interface (HCI) 181
            Section 11.2.  L2CAP 185
            Section 11.3.  Other Protocols 188
            Chapter 12.  Transparent Bridges 189
            Section 12.1.  Introduction 189
            Section 12.2.  Basics 190
            Section 12.3.  Configuring a Bridge in Linux 199
            Section 12.4.  Implementation 202
         Part IV:  Network Layer 221
            Chapter 13.  The TCP/IP Protocols 223
            Section 13.1.  The Internet Protocol Suite 224
            Chapter 14.  The Internet Protocol V4 227
            Section 14.1.  Properties of the Internet Protocol 228
            Section 14.2.  Implementing the Internet Protocol 233
            Section 14.3.  IP Options 250
            Section 14.4.  Internet Control Message Protocol (ICMP) 262
            Chapter 15.  Address Resolution Protocol (ARP) 273
            Section 15.1.  Using the Address Resolution Protocol 274
            Section 15.2.  The ARP Command 276
            Section 15.3.  Implementing the ARP Instance in the Linux Kernel 277
            Chapter 16.  IP Routing 293
            Section 16.1.  Introduction 293
            Section 16.2.  Configuration 301
            Section 16.3.  Implementation 309
            Chapter 17.  IP Multicast for Group Communication 330
            Section 17.1.  Group Communication 331
            Section 17.2.  IP Multicast 333
            Section 17.3.  Internet Group Management Protocol (IGMP) 339
            Section 17.4.  Multicast Data Path in the Linux Kernel 345
            Section 17.5.  Multicasting in Today’s Internet 355
            Section 17.6.  Multicast Transport Protocols 364
            Chapter 18.  Using Traffic Control to Support Quality of Service (QoS) 366
            Section 18.1.  Introduction 366
            Section 18.2.  Basic Structure of Traffic Control in Linux 367
            Section 18.3.  Traffic Control in the Outgoing Direction 367
            Section 18.4.  Kernel Structures and Interfaces 369
            Section 18.5.  Ingress Policing 378
            Section 18.6.  Implementing a Queuing Discipline 378
            Section 18.7.  Configuration 381
            Chapter 19.  Packet Filters and Firewalls 383
            Section 19.1.  Introduction 383
            Section 19.2.  The Ipchains Architecture of Linux 2.2 386
            Section 19.3.  The Netfilter Architecture of Linux 2.4 391
            Chapter 20.  Connection Tracking 399
            Section 20.1.  Introduction 399
            Section 20.2.  Implementation 400
            Chapter 21.  Network Address Translation (NAT) 410
            Section 21.1.  Introduction 410
            Section 21.2.  Configuring NAT in Linux 414
            Section 21.3.  Implementing the NAT Module 416
            Section 21.4.  Interfaces to Extend the NAT Module 422
            Chapter 22.  Extending the Linux Network Architecture Functionality—KIDS 426
            Section 22.1.  Managing Dynamically Extendable Functionalities 426
            Section 22.2.  Structure of the KIDS Construction System 428
            Section 22.3.  Using the KIDS Example to Extend the Linux Network Architecture 431
            Chapter 23.  IPv6—Internet Protocol Version 6 443
            Section 23.1.  Introduction 443
            Section 23.2.  IPv6 Features 443
            Section 23.3.  IPv6 Implementation 450
         Part V:  Layer IV—Transport Layer 455
            Chapter 24.  Transmission Control Protocol (TCP) 457
            Section 24.1.  Overview 457
            Section 24.2.  Implementing The TCP Protocol Instance 460
            Section 24.3.  Connection Management 476
            Section 24.4.  Protocol Mechanisms For Data Exchange 486
            Section 24.5.  Timer Management In TCP 508
            Chapter 25.  User Datagram Protocol (UDP) 513
            Section 25.1.  Introduction 513
            Section 25.2.  Data Structures 514
            Section 25.3.  Sending and Receiving UDP Datagrams 519
            Chapter 26.  The Concept of Sockets 522
            Section 26.1.  Introduction 522
            Section 26.2.  BSD Sockets 522
            Section 26.3.  Protocol-Specific Sockets 526
         Part VI:  Layer V—Application Layer 533
            Chapter 27.  Network Programming With Sockets 535
            Section 27.1.  Introduction 535
            Section 27.2.  Functions of the Socket API 538
            Section 27.3.  Examples 548
         Part VII:  Appendices 549
            Appendix A.  The LXR Source-Code Browser 551
            Section A.1.  Functionality 551
            Section A.2.  Installation 555
            Appendix B.  Debugging in the Linux Kernel 557
            Section B.1.  Log Outputs From the Linux Kernel 557
            Section B.2.  Creating Strings in the Kernel 561
            Section B.3.  Information in the /proc Directory 564
            Section B.4.  Using a Debugger with the Linux Kernel 569
            Appendix C.  Tools and Commands for Network Operation 572
            Section C.1.  Using ifconfig to Manage Network Devices 572
            Section C.2.  Using ping to Test the Reachability 575
            Section C.3.  Using netstat to View the Network State 576
            Section C.4.  Using route for Routing Information 578
            Section C.5.  Using tcpdump for Network Analysis 579
            Section C.6.  USING traceroute TO TRACE PACKETS 582
            Section C.7.  Other Tools 584
            Appendix D.  Example for a Kernel Module 588
            Appendix E.  Example for a Network-Layer Protocol 591
            Appendix F.  Example for a Transport Protocol 593
            Appendix G.  Example for Communication over Sockets 595
            Section G.1.  SERVER 595
            Section G.2.  CLIENT 598
            Bibliography  
         Index 

    Download: The Linux Networking Architecture