This is a cumulation of Java code I've written over the years.