Refactor: tryClose() method
Move tryClose() method in order
Apply unused config value, but keep behavior - looks broken
StringBuilder, rename local, javadocs
Turn manual array copies into System.arrayCopy
Simplify redundant statements and casts
For-each loops, remove unused method parameters
TODO entries
Remove useless local
Merge pull request #28 from riking/refactoring

Fix IntelliJ warnings