JAVA实例技术手册(第二版,影印版)
JAVA实例技术手册(第二版,影印版)
David Flanagan
出版时间:2003年11月
页数:588
本书完全由实际的Java程序实例构成,内容涉及Java 1.3,包含了164个完整、实用的实例:超过17900行的代码注释涵盖了20种不同的Java API,包括servlet、JSP、XML、Swing和Java 2D。最畅销的《Java in a Nutshell》的作者亲自编写了本书所有的实例代码,读者可以从中学习Java语言,也可以对这些代码进行修改为自己所用。如果你喜欢按照实例去学习,那么本书正是你的最佳选择!
本书是《Java in a Nutshell》、《Java Foundation Classes in a Nutshell》和《Java Enterprise in a Nutshell》的姐妹篇。尽管这三本书属于速查手册,但其中仍然对各种Java主题提供了速成指南。而本书则是弥补这些书所遗漏的一些内容,为Java新手提供了一系列的实例代码,当然,这些代码对于那些经验丰富的编程老手来说也同样适用。本书并没有限制读者的发挥,或仅仅对Java的语法或方法调用进行详细的解释,而是展示了一些具有完美注释的优秀代码实例,从而帮助读者最大程度地认识Java。本书的每一章都包含了编程练习,有助于读者巩固所学到的知识。
本书涵盖的主题包括:
* 用来阐述基本Java功能和关键API的实例,包括I/O、线程、网络、安全、映像和串行化。
* 使用图形用户界面和Java图形特性的程序,重点介绍的是Swing、Java 2D、打印、数据传输、JavaBeans和applet API。
* 用来解释关键性企业级API的实例,包括远程方法调用、数据库连接、servlet、JSP和XML。
本书最后附带了一个实例索引,使读者能够方便地找到编程概念或Java类,也能够方便地找到用于阐述某个概念或使用了某个类的实例。
  1. Preface
  2. Part I: Core Java APIs
  3. Chapter 1 Java Basics
  4. Hello World
  5. FizzBuzz
  6. The Fibonacci Series
  7. Using Command-Line Arguments
  8. Echo in Reverse
  9. FizzBuzz Switched
  10. Computing Factorials
  11. Recursive Factorials
  12. Caching Factorials
  13. Computing Big Factorials
  14. Handling Exceptions
  15. Interactive Input
  16. Using a StringBuffer
  17. Sorting Numbers
  18. Computing Primes
  19. Exercises
  20. Chapter 2 Objects, Classes, and Interfaces
  21. A Rectangle Class
  22. Testing the Rect Class
  23. A Rect Subclass
  24. Another Subclass
  25. Complex Numbers
  26. Computing Pseudo-Random Numbers
  27. Computing Statistics
  28. A Linked List Class
  29. Advanced Sorting
  30. Exercises
  31. Chapter 3 Input/Output
  32. Files and Streams
  33. Working with Files
  34. Copying File Contents
  35. Reading and Displaying Text Files
  36. Listing Directory and File Information
  37. Compressing Files and Directories
  38. Filtering Character Streams
  39. Filtering Lines of Text
  40. A Custom HTML Output Stream
  41. Exercises
  42. Chapter 4 Threads
  43. Thread Basics
  44. Threads and Thread Groups
  45. Deadlock
  46. Timers
  47. Exercises
  48. Chapter 5 Networking
  49. Downloading the Contents of a URL
  50. Using a URLConnection
  51. Sending Email Through a URLConnection
  52. Connecting to a Web Server
  53. A Simple Web Server
  54. A Proxy Server
  55. Networking with Applets
  56. A Generic Client
  57. A Generic Multithreaded Server
  58. A Multithreaded Proxy Server
  59. Sending Datagrams
  60. Receiving Datagrams
  61. Exercises
  62. Chapter 6 Security and Cryptography
  63. Running Untrusted Code
  64. Loading Untrusted Code
  65. Message Digests and Digital Signatures
  66. Cryptography
  67. Exercises
  68. Chapter 7 Internationalization
  69. A Word About Locales
  70. Unicode
  71. Character Encodings
  72. Handling Local Customs
  73. Localizing User-Visible Messages
  74. Formatted Messages
  75. Exercises
  76. Chapter 8 Reflection
  77. Obtaining Class and Member Information
  78. Invoking a Named Method
  79. Exercises
  80. Chapter 9 Object Serialization
  81. Simple Serialization
  82. Custom Serialization
  83. Externalizable Classes
  84. Serialization and Class Versioning
  85. Serialized Applets
  86. Exercises
  87. Part II: Graphics and GUIs
  88. Chapter 10 Graphical User Interfaces
  89. Components
  90. Containers
  91. Layout Management
  92. Event Handling
  93. A Complete GUI
  94. Actions and Reflection
  95. Custom Dialogs
  96. Displaying Tables
  97. Displaying Trees
  98. A Simple Web Browser
  99. Describing GUIs with Properties
  100. Themes and the Metal Look-and-Feel
  101. Custom Components
  102. Exercises
  103. Chapter 11 Graphics
  104. Graphics Before Java 1.2
  105. The Java 2D API
  106. Drawing and Filling Shapes
  107. Transforms
  108. Line Styles with BasicStroke
  109. Stroking Lines
  110. Filling Shapes with Paint
  111. Antialiasing
  112. Combining Colors with AlphaComposite
  113. Image Processing
  114. A Custom Shape
  115. Custom Strokes
  116. Custom Paint
  117. Advanced Animation
  118. Displaying Graphics Examples
  119. Exercises
  120. Chapter 12 Printing
  121. Printing with the Java 1.1 API
  122. Printing with the Java 1.2 API
  123. Printing Multipage Text Documents
  124. Printing Swing Documents
  125. Exercises
  126. Chapter 13 Data Transfer
  127. Data Transfer Architecture
  128. Simple Copy-and-Paste
  129. A Transferable Data Type
  130. Cutting and Pasting Scribbles
  131. Dragging and Dropping Scribbles
  132. Exercises
  133. Chapter 14 JavaBeans
  134. Bean Basics
  135. A Simple Bean
  136. A More Complex Bean
  137. Custom Events
  138. Specifying Bean Information
  139. Defining a Simple Property Editor
  140. Defining a Complex Property Editor
  141. Defining a Bean Customizer
  142. Exercises
  143. Chapter 15 Applets
  144. Introduction to Applets
  145. A First Applet
  146. A Clock Applet
  147. Applets and the Java 1.0 Event Model
  148. Java 1.0 Event Details
  149. Reading Applet Parameters
  150. Images and Sounds
  151. JAR Files
  152. Exercises
  153. Part III: Enterprise Java
  154. Chapter 16 Remote Method Invocation
  155. Remote Banking
  156. A Bank Server
  157. A Multiuser Domain
  158. Remote MUD Interfaces
  159. The MUD Server
  160. The MudPlace Class
  161. The MudPerson Class
  162. A MUD Client
  163. Advanced RMI
  164. Exercises
  165. Chapter 17 Database Access with SQL
  166. Accessing a Database
  167. Using Database Metadata
  168. Building a Database
  169. Using the API Database
  170. Atomic Transactions
  171. Exercises
  172. Chapter 18 Servlets and JSP
  173. Servlet Setup
  174. A Hello World Servlet
  175. Servlet Initialization and Persistence: A Counter Servlet
  176. Database Access with Servlets
  177. A Login Screen with JSP
  178. Request Forwarding
  179. JSP Pages and JavaBeans
  180. Ending a User Session
  181. Custom Tags
  182. Deploying a Web Application
  183. Exercises
  184. Chapter 19 XML
  185. Parsing with JAXP and SAX 1
  186. Parsing with SAX 2
  187. Parsing and Manipulating with JAXP and DOM
  188. Traversing a DOM Tree
  189. Traversing a Document with DOM Level 2
  190. The JDOM API
  191. Exercises
  192. Chapter 20 Example Index
  193. Index
书名:JAVA实例技术手册(第二版,影印版)
作者:David Flanagan
国内出版社:清华大学出版社
出版时间:2003年11月
页数:588
书号:7-302-06751-1
原版书出版商:O'Reilly Media
David Flanagan
 
David Flanagan是一名程序员,也是一名作家,它的个人网站是http://davidflanagan.com。他在O’Reilly出版的其他畅销书还包括《JavaScript Pocket Reference》、《The Ruby Programming Language》以及《Java in a Nutshell》。David毕业于麻省理工学院,获得计算机科学与工程学位。他和妻子和孩子一起生活在西雅图和温哥华之间的美国太平洋西北海岸。
 
 
The animal of this book is an alligator. There are only two species of alligator: the American alligator (Alligator
mississippiensis), found in the southeastern coastal plain of the United States, and the smaller Chinese alligator (Alligator sinensis), found in the lower valley of the
Yangtze River. Both alligators are related to the more widely distributed crocodile.
The alligator is a much-studied animal, and so a great deal is known about its life
cycle. Female alligators lay 30 to 80 eggs at a time. The mother allows the sun to
incubate the eggs, but stays nearby. After about 60 days the eggs hatch, and the
young call out for their mother. The mother then carries or leads them to the water,
where they live with her for a year.
Alligators eat a varied diet of insects, fish, shellfish, frogs, water birds, and small
mammals. Alligator attacks on humans are rare. Although normally slow-moving ani-mals,
alligators can charge quickly for short distances when they or their young are
in danger.
Alligators have been hunted extensively for their skin. The American alligator was
placed on the endangered species list in 1969, then declared to be out of danger in
1987. The Chinese alligator remains on the endangered list.