http://developer.java.sun.com/developer/JDCTechTips/2002/tt0219.html#tip1

A JDC Tech tip
Have some source code