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