Book description
Wicked Cool Java contains 101 fun, interesting, and useful ways to get more out of Java. This isn't intended as a Java tutorial--it's targeted at developers and system architects who have some basic Java knowledge but may not be familiar with the wide range of libraries available. Full of example code and ideas for combining them in useful projects, this book is perfect for hobbyists, and professionals will find tips and open-source projects to enhance their code and make their jobs easier. Topics include converting a non-XML text structure into XML using a parser generator, experimenting with a Java simulator for the Cell Matrix, creating dynamic music and sound in Java, working with open-source class libraries for scientific and mathematical applications, and many more.
Table of contents
- Copyright
- Dedication
- Acknowledgments
- Introduction
-
Java Language and Core API
- There Is No for In Java: Using the for Loop Enhancements
- Let Me Count the Ways: Using the enum
- Practice Safe Putting: Using Typesafe Maps
- Generally Generic: Writing Methods with Generic Parameters
- Arguments and More Arguments: Writing Vararg Methods
- Being Assertive: Using Java Assertions
- Living on Nano Time: Using System.nanoTime
- Taking a Very Short Nap: Sub-Millisecond Sleep for Threads
- You Shall Remain Nameless: Creating an Anonymous Class
- Equals Rights: == != .equals
- Chapter Summary
-
String Utilities
- Staying Regular: Using Regular Expressions to Search Text
- Splitsville: Using the String.split Method
- Smartly Subbing: Finding Substring Patterns Within a String
- Getting Captured: Using Regex Capturing Groups
- A String of Substitutes: Substituting with Regular Expressions
- Partially Parseable: Parsing with the Scanner Class
- Scan-Do Attitude: Parsing Complex Syntax with the Scanner Class
- Making It All Up: Generating Random Text
- Array of Hope: Displaying Arrays in Java 1.5
- No Bits Allowed: Encoding and Decoding Binary Data
- A Message for Matt: Formatting Strings with MessageFormat
- The Reincarnation of printf: Formatting Strings with Formatter
- Chapter Summary
-
Processing XML and HTML
- Quick XML Refresher
- Stop and XML the Rowsets: Using WebRowSet to Create XML
- Stacks of SAX: Remembering Tag Relationships in SAX
- Playing the SAX: Directly Feeding a ContentHandler
- Mustard on a SAX-wich: Filter-Feeding a ContentHandler
- Easy Reading: Using DOM4J to Read XML Documents
- Eck's Path: Using XPath for Easy Data Extraction
- Invisible Tags: Filtering Documents Before Loading into DOM4J
- Sin Taxes: Generating Parsers for Anything with JavaCC
- To XML and Beyond: Converting Other Grammars into XML
- Scraping the Sun: Screen Scraping HTML Pages for Data
- What's Lou Seen? Searching with Lucene
- Chapter Summary
-
Crawling the Semantic Web
- This Somethings That: A Short Introduction to N3 and Jena
- Triple the Fun: Creating an RDF Vocabulary for Your Organization
- Who's a What? Using RDF Hierarchies in Jena
- Getting Attached: Attaching Dublin Core to HTML Documents
- What's the Reason? Making Queries with Jena RDQL
- Simply Logical: Lojban, RDF, and the Jorne Project
- Guess What? Publishing RSS Newsfeeds with Informa
- What's Up? Aggregating RSS Newsfeeds
- Heading to the Polls: Polling RSS Feeds with Informa
- All the News Fit to Print: Filtering RSS Feeds with Informa
- Chapter Summary
-
Scientific and Mathematical Applications
- Fun-Tors: Creating and Applying Functors
- Funkier Functors: Using Composite Functors
- High-Caliber Bits: Using Colt's BitVector
- The Truth Is in There: Creating Truth Tables from a BitMatrix
- Two Terafurlongs per Fortnight: Using JScience Quantities
- Fractious Fractions: Arbitrary-Precision Arithmetic
- Proudly Polynomial: Using Algebraic Functions in JScience
- Connecting the Nots: Connecting Truth Tables Using Ports
- The Knee Bone's Connected to the...: Connecting with JGraphT
- Tied Up in Meta-Nots: Connecting Generic Processing Units
- Joone Bugs: Building Neural Networks in Joone
- It's Alive! Using JGAP for Genetic Algorithms
- IA Is AI: Building Intelligent Agents Using Jade
- Word Up: Navigating English with JWordNet
- Chapter Summary
-
Graphics and Data Visualization
- Gooey XML: Defining Java GUIs in XML
- To the Vector Goes the Spoils: Visualizing Data with SVG
- See SVG: Viewing SVG Content with Batik
- Body Art: Converting JGraphT into a JGraph View
- Attri-Beauty: Using JGraph Attribute Maps
- Charting New Territory: Creating Charts with JFreeChart
- Reporting for Duty: Creating Reports in Java
- Periodic Patterns: Simple 2D Data Visualization
- A Fine Transform: Using Affine Transformations in Java 2D
- Room to Zoom: Building Zoomable GUIs with Piccolo
- Chapter Summary
-
Multimedia and Synchronization
- Fugue Fun: Making Music with JFugue
- Fugue in Mid-D: Using JFugue with Java Sound MIDI
- All MIDI-ed Out: Sending Events to a MIDI Output Device
- Beeps and Bleeps: Synthesizing Sounds with JMusic
- Hiss, Buzz, Hum: Using Noise and Complex Synthesis in JMusic
- Getting an Outside Line: Working with Low-Level Java Sound
- Yes, Dear, I'm Listening: Reading Audio from an Input Line
- Talk to Me! Using Java Speech to Make Programs Talk
- Reduce, Reuse, Recycle: GC and the Javolution Real-Time APIs
- Hurry Up and Wait: Synchronizing Threads Using CyclicBarrier
- Chapter Summary
-
Fun, Integration, and Project Ideas
- Think Outside the Blocks: Using Java to Control a LEGO Robot
- Aye, Robot: Controlling the Mouse with the AWT Robot Class
- Click and Pick: Picking Dates Using JCalendar
- Post Haste: Using HttpClient to Post Forms to HTTP Servers
- She Sells C Cells: Simulating a Cell Matrix in Java
- Nature's May Tricks: Evolving Cell Matrices
- A Real Worker Ant: Running Applications with Apache Ant
- Playing a Shell Game: Using BeanShell
- Testing, Testing, Testing: Creating JUnit Tests
- Peering into the Future: Using JXTA for Peer-to-Peer Applications
- Grid Is Good: Using the Globus Toolkit and Grid Computing
- Jabberwocky: Adding Chat to Your Application with Jabber
- Some Assembly Required: Writing JVM Assembly Language
- Bytecode Critters: Combining Genetic Programming with BCEL
- Coffee Substitutes: Compiling Other Languages to Bytecode
- LojViz: Grammar Visualizer for Lojban
- Pitch Patch: Synthesizer Patch Editor
- Words with Wires: WordNet Explorer
- News on Tap: Automated Newsfeed Generator
- Robot School: Neural Net Robotics
- Annotation Innovation: Java 5.0 Annotation Management Tool
- The Winds of Change: Using CVS and Source Code Control
- Forging Ahead: Using SourceForge for Your Projects
- Chapter Summary
- Glossary
- Updates
- Index
Product information
- Title: Wicked Cool Java
- Author(s):
- Release date: November 2005
- Publisher(s): No Starch Press
- ISBN: 9781593270612
You might also like
book
The class of Java
This book focuses on JAVA, which is an object-oriented and platform-independent language. JAVA has surely become …
book
Java 9 Programming By Example
Get the steps you need to discover the world of Java 9 programming using real-world examples …
book
Learn Java the Easy Way
"Java is the world’s most popular programming language, but it’s known for having a steep learning …
book
Java EE 8 Development with Eclipse
Develop and deploy fully functional applications and microservices utilising Tomcat, Glassfish servers, Cloud and docker in …