from http://oplop.googlecode.com/svn/trunk/Java/src/com/twmacinta/util/
LGPL licensing