Books & Videos

Table of Contents

  1. Chapter 1 Supplements to the Java 2 Platform

    1. Introduction

    2. Obtaining Commons Lang

    3. Joining the Commons-User Mailing List

    4. Getting the Commons Lang Source Code

    5. Automating the Generation of toString( ) Content

    6. Customizing Generated toString( ) Content

    7. Automating hashCode( ) and equals( )

    8. Automating compareTo( )

    9. Printing an Array

    10. Cloning and Reversing Arrays

    11. Transforming Between Object Arraysand Primitive Arrays

    12. Finding Items in an Array

    13. Creating a Map from a Multidimensional Array

    14. Formatting Dates

    15. Rounding Date Objects

    16. Truncating Date Objects

    17. Creating an Enum

    18. Generating Unique Numeric Identifiers

    19. Validation of Method Parameters

    20. Measuring Time

  2. Chapter 2 Manipulating Text

    1. Introduction

    2. Setting Up StringUtils and WordUtils

    3. Checking for an Empty String

    4. Abbreviating Strings

    5. Splitting a String

    6. Finding Nested Strings

    7. Stripping and Trimming a String

    8. Chomping a String

    9. Creating an Emphasized Header

    10. Reversing a String

    11. Wrapping Words

    12. Testing the Contents of a String

    13. Measuring the Frequency of a String

    14. Parsing Formatted Strings

    15. Calculating String Difference

    16. Using Commons Codec

    17. Getting the Commons Codec Source Code

    18. Calculating Soundex

  3. Chapter 3 JavaBeans

    1. Introduction

    2. Representing Beans Graphically

    3. Obtaining Commons BeanUtils

    4. Getting the Commons BeanUtils Source Code

    5. Accessing Simple Bean Properties

    6. Accessing Nested Bean Properties

    7. Accessing Indexed Bean Properties

    8. Accessing Mapped Bean Properties

    9. Accessing a Simple, Nested, Indexed, and Mapped Bean Property

    10. Determining the Type of a Bean Property

    11. Comparing Beans

    12. Copying Bean Properties

    13. Cloning a Bean

    14. Setting a Bean Property

    15. Testing Property Access

    16. Validating Beans with Predicates

    17. Creating a Map of Bean Properties

    18. Wrapping a Bean with a Map

    19. Creating a Dynamic Bean

    20. Getting and Setting Properties as Strings

  4. Chapter 4 Functors

    1. Introduction

    2. Obtaining Commons Collections

    3. Getting the Commons Collections Source Code

    4. Reversing a Comparator

    5. Chaining Comparators

    6. Comparing Nulls

    7. Fixed-Order Comparison

    8. Using Simple Predicates

    9. Writing a Custom Predicate

    10. Creating Composite Predicates

    11. Transforming Objects

    12. Creating a Chain of Transformations

    13. Applying Conditional Transformations

    14. Writing a Closure

    15. Chaining Closures

    16. Modeling Conditional Statements with Closures

    17. Modeling Loops with Closures

  5. Chapter 5 Collections

    1. Introduction

    2. Obtaining Commons Collections

    3. Using a Looping Iterator

    4. Iterating Over an ArrayList

    5. Filtering a Collection with a Predicate

    6. Iterating Through Distinct Elements

    7. Using a Bag

    8. Using a Buffer

    9. Creating a Priority Queue

    10. Using a Blocking Buffer

    11. Storing Multiple Values in a Map

    12. Retrieving a Key by a Value

    13. Using a Case-Insensitive Map

    14. Creating Typed Collections and Maps

    15. Constraining Map Values

    16. Constraining List Contents

    17. Transforming Collections

    18. Creating a Least Recently Used Cache

    19. Using a Lazy Map

    20. Counting Objects in a Collection

    21. Performing Set Operations

    22. Retrieving Map Values Without Casting

  6. Chapter 6 XML

    1. Introduction

    2. Obtaining Jakarta Commons Digester

    3. Turning XML Documents into Objects

    4. Namespace-Aware Parsing

    5. Creating a Simple XML Command Language

    6. Variable Substitution and XML Parsing

    7. Obtaining Jakarta Commons Betwixt

    8. Turning Beans into XML Documents

    9. Customizing XML Generated from an Object

    10. Turning XML Documents into Beans

  7. Chapter 7 Application Infrastructure

    1. Introduction

    2. Obtaining Commons CLI

    3. Parsing a Simple Command Line

    4. Parsing a Complex Command Line

    5. Printing Usage Information

    6. Obtaining Commons Configuration

    7. Configuring Applications with Properties Files

    8. Configuring Applications with XML

    9. Using Composite Configuration

    10. Obtaining Commons Logging

    11. Using an Abstract Logging Interface

    12. Specifying a Logging Implementation

    13. Obtaining Apache Log4J

    14. Configuring Log4J with a Properties File

    15. Configuring Log4J with XML

  8. Chapter 8 Math

    1. Introduction

    2. Using Fractions

    3. Finding the Maximum and Minimum in an Array

    4. Using Number Ranges

    5. Generating Random Variables

    6. Obtaining Commons Math

    7. Calculating Simple Univariate Statistics

    8. Solving a System of Linear Equations

    9. Arithmetic with Complex Numbers

    10. Establishing Relationships Between Variables

    11. Estimating the Amount of Time Left in a Process

  9. Chapter 9 Templating

    1. Introduction

    2. Obtaining Commons JEXL

    3. Using an Expression Language

    4. Invoking Methods in an Expression

    5. Externalizing Logic with an Expression Language

    6. Obtaining Jakarta Velocity

    7. Using a Simple Templating Language

    8. Writing Templates with Conditionals and Loops

    9. Using Macros in a Templating Engine

    10. Invoking Methods in a Template

    11. Obtaining FreeMarker

    12. Using a Complex Scripting Engine

    13. Accessing XML Documents from a Templating Engine

    14. Using Velocity in a Web Application

    15. Using FreeMarker in a Web Application

    16. Writing Templates in Eclipse

  10. Chapter 10 I/O and Networking

    1. Introduction

    2. Obtaining Commons IO

    3. Copying Streams, byte[ ], Readers, and Writers

    4. Closing Streams, Readers, and Writers

    5. Printing a Human-Readable File Size

    6. Copying Files, Strings, and URLs

    7. Deleting Directories Recursively

    8. Obtaining the Size of a Directory

    9. Touching a File

    10. Filtering Files

    11. Measuring Stream Traffic

    12. Splitting an OutputStream

    13. Obtaining Jakarta ORO

    14. Using Globs and Perl5 Regular Expressions to List Files

    15. Obtaining Commons Net

    16. Writing an FTP Client

    17. Sending Mail with SMTP

    18. Checking a POP3 Mailbox

  11. Chapter 11 HTTP and WebDAV

    1. Introduction

    2. Obtaining Jakarta HttpClient

    3. Getting Jakarta HttpClient Source Code

    4. Performing an HTTP GET

    5. Sending Parameters in a Query String

    6. Retrieving Content with a Conditional GET

    7. Debugging HTTP Communications

    8. Making an HTTP POST Request

    9. Sending POST Data from a File

    10. Uploading Files with a Multipart POST

    11. Basic Authentication

    12. NTLM Authentication

    13. Working with Cookies

    14. Handling Redirects

    15. SSL

    16. Accepting a Self-Signed Certificate

    17. Obtaining Jakarta Slide

    18. Connecting to WebDAV Resources

    19. Modifying a WebDAV Resource

  12. Chapter 12 Searching and Filtering

    1. Introduction

    2. Obtaining Commons JXPath

    3. Querying an Object Graph with XPath

    4. Search a Collection of Simple Objects

    5. Applying XPath Queries to Complex Object Graphs

    6. Obtaining Jakarta Lucene

    7. Creating an Index of XML Documents

    8. Searching for a Specific Term in a Document Index

    9. Finding the Frequency of Terms in an Index

  1. Colophon