-
Chapter 1 Supplements to the Java 2 Platform
-
Introduction
-
Obtaining Commons Lang
-
Joining the Commons-User Mailing List
-
Getting the Commons Lang Source Code
-
Automating the Generation of toString( ) Content
-
Customizing Generated toString( ) Content
-
Automating hashCode( ) and equals( )
-
Automating compareTo( )
-
Printing an Array
-
Cloning and Reversing Arrays
-
Transforming Between Object Arraysand Primitive Arrays
-
Finding Items in an Array
-
Creating a Map from a Multidimensional Array
-
Formatting Dates
-
Rounding Date Objects
-
Truncating Date Objects
-
Creating an Enum
-
Generating Unique Numeric Identifiers
-
Validation of Method Parameters
-
Measuring Time
-
-
Chapter 2 Manipulating Text
-
Introduction
-
Setting Up StringUtils and WordUtils
-
Checking for an Empty String
-
Abbreviating Strings
-
Splitting a String
-
Finding Nested Strings
-
Stripping and Trimming a String
-
Chomping a String
-
Creating an Emphasized Header
-
Reversing a String
-
Wrapping Words
-
Testing the Contents of a String
-
Measuring the Frequency of a String
-
Parsing Formatted Strings
-
Calculating String Difference
-
Using Commons Codec
-
Getting the Commons Codec Source Code
-
Calculating Soundex
-
-
Chapter 3 JavaBeans
-
Introduction
-
Representing Beans Graphically
-
Obtaining Commons BeanUtils
-
Getting the Commons BeanUtils Source Code
-
Accessing Simple Bean Properties
-
Accessing Nested Bean Properties
-
Accessing Indexed Bean Properties
-
Accessing Mapped Bean Properties
-
Accessing a Simple, Nested, Indexed, and Mapped Bean Property
-
Determining the Type of a Bean Property
-
Comparing Beans
-
Copying Bean Properties
-
Cloning a Bean
-
Setting a Bean Property
-
Testing Property Access
-
Validating Beans with Predicates
-
Creating a Map of Bean Properties
-
Wrapping a Bean with a Map
-
Creating a Dynamic Bean
-
Getting and Setting Properties as Strings
-
-
Chapter 4 Functors
-
Introduction
-
Obtaining Commons Collections
-
Getting the Commons Collections Source Code
-
Reversing a Comparator
-
Chaining Comparators
-
Comparing Nulls
-
Fixed-Order Comparison
-
Using Simple Predicates
-
Writing a Custom Predicate
-
Creating Composite Predicates
-
Transforming Objects
-
Creating a Chain of Transformations
-
Applying Conditional Transformations
-
Writing a Closure
-
Chaining Closures
-
Modeling Conditional Statements with Closures
-
Modeling Loops with Closures
-
-
Chapter 5 Collections
-
Introduction
-
Obtaining Commons Collections
-
Using a Looping Iterator
-
Iterating Over an ArrayList
-
Filtering a Collection with a Predicate
-
Iterating Through Distinct Elements
-
Using a Bag
-
Using a Buffer
-
Creating a Priority Queue
-
Using a Blocking Buffer
-
Storing Multiple Values in a Map
-
Retrieving a Key by a Value
-
Using a Case-Insensitive Map
-
Creating Typed Collections and Maps
-
Constraining Map Values
-
Constraining List Contents
-
Transforming Collections
-
Creating a Least Recently Used Cache
-
Using a Lazy Map
-
Counting Objects in a Collection
-
Performing Set Operations
-
Retrieving Map Values Without Casting
-
-
Chapter 6 XML
-
Introduction
-
Obtaining Jakarta Commons Digester
-
Turning XML Documents into Objects
-
Namespace-Aware Parsing
-
Creating a Simple XML Command Language
-
Variable Substitution and XML Parsing
-
Obtaining Jakarta Commons Betwixt
-
Turning Beans into XML Documents
-
Customizing XML Generated from an Object
-
Turning XML Documents into Beans
-
-
Chapter 7 Application Infrastructure
-
Introduction
-
Obtaining Commons CLI
-
Parsing a Simple Command Line
-
Parsing a Complex Command Line
-
Printing Usage Information
-
Obtaining Commons Configuration
-
Configuring Applications with Properties Files
-
Configuring Applications with XML
-
Using Composite Configuration
-
Obtaining Commons Logging
-
Using an Abstract Logging Interface
-
Specifying a Logging Implementation
-
Obtaining Apache Log4J
-
Configuring Log4J with a Properties File
-
Configuring Log4J with XML
-
-
Chapter 8 Math
-
Introduction
-
Using Fractions
-
Finding the Maximum and Minimum in an Array
-
Using Number Ranges
-
Generating Random Variables
-
Obtaining Commons Math
-
Calculating Simple Univariate Statistics
-
Solving a System of Linear Equations
-
Arithmetic with Complex Numbers
-
Establishing Relationships Between Variables
-
Estimating the Amount of Time Left in a Process
-
-
Chapter 9 Templating
-
Introduction
-
Obtaining Commons JEXL
-
Using an Expression Language
-
Invoking Methods in an Expression
-
Externalizing Logic with an Expression Language
-
Obtaining Jakarta Velocity
-
Using a Simple Templating Language
-
Writing Templates with Conditionals and Loops
-
Using Macros in a Templating Engine
-
Invoking Methods in a Template
-
Obtaining FreeMarker
-
Using a Complex Scripting Engine
-
Accessing XML Documents from a Templating Engine
-
Using Velocity in a Web Application
-
Using FreeMarker in a Web Application
-
Writing Templates in Eclipse
-
-
Chapter 10 I/O and Networking
-
Introduction
-
Obtaining Commons IO
-
Copying Streams, byte[ ], Readers, and Writers
-
Closing Streams, Readers, and Writers
-
Printing a Human-Readable File Size
-
Copying Files, Strings, and URLs
-
Deleting Directories Recursively
-
Obtaining the Size of a Directory
-
Touching a File
-
Filtering Files
-
Measuring Stream Traffic
-
Splitting an OutputStream
-
Obtaining Jakarta ORO
-
Using Globs and Perl5 Regular Expressions to List Files
-
Obtaining Commons Net
-
Writing an FTP Client
-
Sending Mail with SMTP
-
Checking a POP3 Mailbox
-
-
Chapter 11 HTTP and WebDAV
-
Introduction
-
Obtaining Jakarta HttpClient
-
Getting Jakarta HttpClient Source Code
-
Performing an HTTP GET
-
Sending Parameters in a Query String
-
Retrieving Content with a Conditional GET
-
Debugging HTTP Communications
-
Making an HTTP POST Request
-
Sending POST Data from a File
-
Uploading Files with a Multipart POST
-
Basic Authentication
-
NTLM Authentication
-
Working with Cookies
-
Handling Redirects
-
SSL
-
Accepting a Self-Signed Certificate
-
Obtaining Jakarta Slide
-
Connecting to WebDAV Resources
-
Modifying a WebDAV Resource
-
-
Chapter 12 Searching and Filtering
-
Introduction
-
Obtaining Commons JXPath
-
Querying an Object Graph with XPath
-
Search a Collection of Simple Objects
-
Applying XPath Queries to Complex Object Graphs
-
Obtaining Jakarta Lucene
-
Creating an Index of XML Documents
-
Searching for a Specific Term in a Document Index
-
Finding the Frequency of Terms in an Index
-
-
Colophon
- Title:
- Jakarta Commons Cookbook
- By:
- Timothy M. O'Brien
- Publisher:
- O'Reilly Media
- Formats:
-
- Safari Books Online
- Print Release:
- November 2004
- Pages:
- 400
- Print ISBN:
- 978-0-596-00706-5
- | ISBN 10:
- 0-596-00706-X
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Jakarta Commons Cookbook is an aardvark. Native to the grasslands and woodlands of sub-Saharan Africa, the aardvark is the only surviving species in the Orycteropodidae family of mammals. Despite being named for its resemblance to the pig (the word aardvark derives from the Dutch for "earth pig"), the aardvark's appearance is far more similar to that of marsupials, such as the bilby and the bandicoot.
Aardvarks are distinguished by their pig-like torso, arched back, oversized ears, and lengthy snout. They are typically yellow-gray in color, although their tough skin may appear reddish-brown when coated in soil. On average, the adult aadvark is slightly more than three feet long and weighs approximately 90 to 140 pounds. Aardvarks dine almost exclusively on ants and termites, for which their tiny, tubular mouth and long, slender tongue are ideally suited. Upon locating a cache of ants with their keen sense of smell, aardvarks use their strong front legs to dig into the nest and rapidly lap up the insects with their sticky tongue. Scientists have observed aardvarks devouring as many as 50,000 insects in a single night!
By nature, aardvarks tend to be reclusive. They are nocturnal creatures that build elaborate individual burrows of up to 40 feet in length in their home terrain, used to search for food and provide temporary shelter. Mothers make use of burrows as a more permanent home when giving birth to their young.
Currently, aardvarks are not considered an endangered species. However, they are still targeted by hunters for their exquisite cylindrical teeth, which are often used for decorative purposes. Matt Hutchinson was the production editor for Jakarta Commons Cookbook. Octal Publishing, Inc. provided production services. Marlowe Shaeffer, Sarah Sherman, and Darren Kelly provided quality control.
Emma Colby designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from Illustrated Natural History. Clay Fernald produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.
David Futato designed the interior layout. This book was converted by Julie Hawks to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Sanders Kleinfeld.
