Due to request from users, you can find the original source code as an attachment for this post.
However, it was written almost 10 years ago with JDK1.0.2.
Some modification might be needed to work with current JDK.