Backport to Java 6
Update docs
Merge pull request #1 from HaloFour/java6

Backport library to support Java 6