Java Phrasebook
暫譯: Java 實用手冊

Timothy R. Fisher

  • 出版商: SAMS
  • 出版日期: 2006-11-16
  • 定價: $700
  • 售價: 5.0$350
  • 語言: 英文
  • 頁數: 224
  • 裝訂: Paperback
  • ISBN: 0672329077
  • ISBN-13: 9780672329074
  • 相關分類: Java 程式語言
  • 立即出貨(限量) (庫存=7)

買這商品的人也買了...

商品描述

Description  

Essential Code and Commands

 

Java Phrasebook gives you the code phrases you need to quickly and effectively complete your programming projects in Java.

 

Concise and Accessible

Easy to carry and easy to use–lets you ditch all those bulky books for one portable guide

 

Flexible and Functional

Packed with more than 100 customizable code snippets–so you can readily code functional Java in just about any situation

 

Timothy Fisher has been working professionally in the Java software development field since 1997 and is currently a consultant for the Compuware Corporation in Detroit, Michigan. He enjoys writing about technology and has been a contributor to Java Developer’s Journal and XML Journal. Tim is also passionate about education and the use of advanced Internet technologies for education.

 

Table of Contents       

Introduction

    1    The Basics

        Compiling a Java Program

        Running a Java Program

        Setting the Classpath

    2    Interacting with the Environment

        Getting Environment Variables

        Setting and Getting System Properties

        Parsing Command-Line Arguments

    3    Manipulating Strings

        Comparing Strings

        Searching For and Retrieving Substrings

        Processing a String One Character at a Time

        Reversing a String by Character

        Reversing a String by Word

        Making a String All Uppercase or All Lowercase

        Trimming Spaces from the Beginning or End of a String

        Parsing a Comma-Separated String

    4    Working with Data Structures

        Resizing an Array

        Iterating Over a Collection

        Creating a Mapped Collection

        Sorting a Collection

        Finding an Object in a Collection

        Converting a Collection to an Array

    5    Dates and Times

        Finding Today’s Date

        Converting Between Date and Calendar Objects

        Printing Date/Time in a Given Format

        Parsing Strings into Dates

        Adding to or Subtracting from a Date or Calendar

        Calculating the Difference Between Two Dates

        Comparing Dates

        Finding the Day of Week/Month/Year or Week Number

        Calculating Elapsed Time

    6    Pattern Matching with Regular Expressions

        Regular Expressions in Java

        Finding Matching Text Using a Regular Expression

        Replacing Matched Text

        Finding All Occurrences of a Pattern

        Printing Lines Containing a Pattern

        Matching Newlines in Text

    7    Numbers

        Checking Whether a String Is a Valid Number

        Comparing Floating Point Numbers

        Rounding Floating Point Numbers

        Formatting Numbers

        Formatting Currencies

        Converting an Integer to Binary, Octal, and Hexadecimal

        Generating Random Numbers

        Calculating Trigonometric Functions

        Calculating a Logarithm

    8    Input and Output

        Reading Text from Standard Input

        Writing to Standard Output

        Formatting Output

        Opening a File by Name

        Reading a File into a Byte Array

        Reading Binary Data

        Seeking in a File

        Reading a JAR or Zip Archive

        Creating a Zip Archive

    9    Working with Directories and Files

        Creating a File

        Renaming a File or Directory

        Deleting a File or Directory

        Changing File Attributes

        Getting the Size of a File

        Determining if a File or Directory Exists

        Moving a File or Directory

        Getting an Absolute Filename Path from a Relative Filename Path

        Determining if a Filename Path is a File or Directory

        Listing a Directory

        Creating a New Directory

    10    Network Clients

        Contacting a Server

        Finding IP Addresses and Domain Names

        Handling Network Errors

        Reading Text

        Writing Text

        Reading Binary Data

        Writing Binary Data

        Reading Serialized Data

        Writing Serialized Data

        Reading a Web Page via HTTP

    11    Network Servers

        Creating a Server and Accepting a Request

        Returning a Response

        Returning an Object

        Handling Multiple Clients

        Serving HTTP Content

    12    Sending and Receiving Email

        Overview of JavaMail API

        Sending Email

        Sending MIME Email

        Reading Email

    13    Database Access

        Connecting to a Database via JDBC

        Sending a Query via JDBC

        Using a Prepared Statement

        Retrieving Results of a Query

        Using a Stored Procedure

    14    Using XML

        Parsing XML with SAX

        Parsing XML with DOM

        Using a DTD to Verify an XML Document

        Creating an XML Document with DOM

        Transforming XML with XSLT

    15    Using Threads

        Starting a Thread

        Stopping a Thread

        Waiting For a Thread to Complete

        Synchronizing Threads

        Pausing a Thread

        Listing All Threads

    16    Dynamic Programming Through Reflection

        Getting a Class Object

        Getting a Class Name

        Discovering Class Modifiers

        Finding Superclasses

        Determining the Interfaces Implemented by a Class

        Discovering Class Fields

        Discovering Class Constructors

        Discovering Method Information

        Getting Field Values

        Setting Field Values

        Invoking Methods

        Loading and Instantiating a Class Dynamically

    17    Packaging and Documenting Classes

        Creating a Package

        Documenting Classes with JavaDoc

        Archiving Classes with Jar

        Running a Program from a JAR File

商品描述(中文翻譯)

**描述**

**基本程式碼與命令**

《Java 口語手冊》提供您完成 Java 程式專案所需的程式碼片語,讓您能快速且有效地完成工作。

**簡潔易用**

輕巧便攜,讓您不必再攜帶那些笨重的書籍,只需一本便攜指南。

**靈活且功能強大**

內含超過 100 個可自訂的程式碼片段,讓您能在幾乎任何情況下輕鬆編寫功能性 Java 程式。

Timothy Fisher 自 1997 年以來專業從事 Java 軟體開發,目前是位於密西根州底特律的 Compuware Corporation 顧問。他喜歡撰寫技術文章,曾為《Java Developer’s Journal》和《XML Journal》貢獻內容。Tim 也熱衷於教育以及利用先進的網際網路技術進行教育。

**目錄**

引言
1 基礎知識
- 編譯 Java 程式
- 執行 Java 程式
- 設定 Classpath
2 與環境互動
- 獲取環境變數
- 設定與獲取系統屬性
- 解析命令列參數
3 操作字串
- 比較字串
- 搜尋與擷取子字串
- 一次處理字串中的一個字元
- 按字元反轉字串
- 按單字反轉字串
- 將字串轉為全大寫或全小寫
- 剪裁字串開頭或結尾的空格
- 解析以逗號分隔的字串
4 使用資料結構
- 調整陣列大小
- 遍歷集合
- 創建映射集合
- 排序集合
- 在集合中尋找物件
- 將集合轉換為陣列
5 日期與時間
- 獲取今天的日期
- 在日期與日曆物件之間轉換
- 以特定格式列印日期/時間
- 將字串解析為日期
- 在日期或日曆上加減
- 計算兩個日期之間的差異
- 比較日期
- 獲取星期/月份/年份的日子或週數
- 計算經過的時間
6 使用正規表達式進行模式匹配
- Java 中的正規表達式
- 使用正規表達式尋找匹配的文字
- 替換匹配的文字
- 尋找所有模式的出現
- 列印包含模式的行
- 匹配文字中的換行符
7 數字
- 檢查字串是否為有效數字
- 比較浮點數
- 四捨五入浮點數
- 格式化數字
- 格式化貨幣
- 將整數轉換為二進位、八進位和十六進位
- 生成隨機數字
- 計算三角函數
- 計算對數
8 輸入與輸出
- 從標準輸入讀取文字
- 寫入標準輸出
- 格式化輸出
- 按名稱打開檔案
- 將檔案讀入位元組陣列
- 讀取二進位資料
- 在檔案中尋找
- 讀取 JAR 或 Zip 檔案
- 創建 Zip 檔案
9 操作目錄與檔案
- 創建檔案
- 重新命名檔案或目錄
- 刪除檔案或目錄
- 更改檔案屬性
- 獲取檔案大小
- 確定檔案或目錄是否存在
- 移動檔案或目錄
- 從相對檔案路徑獲取絕對檔案路徑
- 確定檔案路徑是檔案還是目錄
- 列出目錄
- 創建新目錄
10 網路客戶端
- 聯繫伺服器
- 查找 IP 位址和網域名稱
- 處理網路錯誤
- 讀取文字
- 寫入文字
- 讀取二進位資料
- 寫入二進位資料
- 讀取序列化資料
- 寫入序列化資料
- 通過 HTTP 讀取網頁
11 網路伺服器
- 創建伺服器並接受請求
- 返回回應
- 返回物件
- 處理多個客戶端
- 提供 HTTP 內容
12 發送與接收電子郵件
- JavaMail API 概述
- 發送電子郵件
- 發送 MIME 電子郵件
- 讀取電子郵件
13 資料庫存取
- 通過 JDBC 連接到資料庫
- 通過 JDBC 發送查詢

最後瀏覽商品 (20)