It may be necessary for you to go to Sun's Java documentation
However, the code in Listing 3 is straightforward