Code Snippets   

These are various small pieces of code that I created over the years for some purpose or other, mostly in Java. Some of them may be helpful to others, so I've put them here for wider access.

  • ExprJava is a Java class that evaluates a mathematical expression by using a recursive-descent parser. It also handles variable substitution, and is useful for evaluating user-entered expressions.

  • AntTask shows how to extend Ant with custom tasks

  • WhoisLookup contains an implementation of a WHOIS lookup, based on the Apache Commons Net library (which has some limitations)

  • PdfBox is an example of how to create a PDF file with the Apache PDFBox library, and how to use a few of its capabilities