內容大鋼
本書是經典的《Java核心技術卷Ⅱ:高級特性》的新版。這一版對全書進行了全面修訂,以涵蓋Java 21的新特性。
本書是Java技術權威指南,全面覆蓋Java技術的高級主題,包括流、輸入與輸出、XML、網路API、資料庫編程、日期與時間API、國際化、編譯與腳本、安全、圖形用戶界面編程、Swing用戶界面組件、高級Swing和圖形編程、本地方法等內容。本書對Java技術的闡述精確到位,敘述方式深入淺出,並包含大量程序示例,從而幫助讀者充分理解Java語言以及Java類庫的相關高級特性。
本書適合想將Java應用於實際項目的軟體開發人員、高等院校教師和學生參考閱讀。
作者介紹
(美)凱·S.霍斯特曼|責編:陳燦然
凱·S.霍斯特曼(Cay S.Horstmann ),聖何塞州立大學電腦科學系教授、Java的倡導者。他是《Java核心技術》兩卷本的作者,並著有Core Java SE 9 for the Impatient, Second Edition和Scala for the Impatient, Second Edition(均由Addison-Wesley出版)。他還為專業程序員和電腦科學專業的學生撰寫過數十本其他圖書。
目錄
Chapter 1: Streams 流
1.1 From Iterating to Stream Operations 從迭代到流操作
1.2 Stream Creation 流的創建
1.3 The filter, map, and flatMap Methods filter、map和flatMap方法
1.4 Extracting Substreams and Combining Streams 提取子流和組合流
1.5 Other Stream Transformations 其他流變換
1.6 Simple Reductions 簡單規約
1.7 The Optional Type Optional 類型
1.7.1 Getting an Optional Value 獲得Optional值
1.7.2 Consuming an Optional Value 消耗Optional值
1.7.3 Pipelining Optional Values 以流水線方式使用Optional值
1.7.4 How Not to Work with Optional Values 避免錯誤使用Optional值
1.7.5 Creating Optional Values 創建Optional值
1.7.6 Composing Optional Value Functions with flatMap 使用flatMap組合Optional值函數
1.7.7 Turning an Optional into a Stream 將Optional值變到流中
1.8 Collecting Results 收集結果
1.9 Collecting into Maps 將結果收集到映射中
1.10 Grouping and Partitioning 分組與分區
1.11 Downstream Collectors 下游收集器
1.12 Reduction Operations 規約操作
1.13 Primitive Type Streams 基本類型流
1.14 Parallel Streams 並行流
Chapter 2: Input and Output 輸入與輸出
2.1 Input Output Streams 輸入/輸出流
2.1.1 Reading and Writing Bytes 讀寫位元組
2.1.2 The Complete Stream Zoo 流譜系概覽
2.1.3 Combining Input Output Stream Filters 組合輸入/輸出流過濾器
2.1.4 Text Input and Output 文本輸入與輸出
2.1.5 How to Read Text Input 輸入文本
2.1.6 How to Write Text Output 輸出文本
2.1.7 Saving Objects in Text Format 以文本格式保存對象
2.1.8 Character Encodings 字元編碼
2.1.9 Reading Character Input 讀取字元輸入
2.2 Reading and Writing Binary Data 讀寫二進位數據
2.2.1 The DataInput and DataOutput Interfaces DataInput和DataOutput介面
2.2.2 Random-Access Files 隨機訪問文件
2.2.3 ZIP Archives ZIP 文檔
2.3 Object Input Output Streams and Serialization 對象輸入/輸出流與序列化
2.3.1 Saving and Loading Serializable Objects 序列化對象的保存與載入
2.3.2 Understanding the Object Serialization File Format 理解對象序列化文件格式
2.3.3 Transient Fields transient欄位
2.3.4 The readObject and writeObject Methods readObject與writeObject方法
2.3.5 The readExternal and writeExternal Methods readExternal與writeExternal方法
2.3.6 The readResolve and writ
Chapter 7: Internationalization 國際化
Chapter 8: Compiling and Scripting 編譯與腳本
Chapter 9: Security 安全
Chapter 10: Graphical User Interface Programming 圖形用戶界面編程
Chapter 11: User Interface Components with Swing Swing用戶界面組件
Chapter 12: Advanced Swing and Graphics 高級Swing和圖形編程
Chapter 13: Native Methods 本地方法