More Java sanitization (use of File.createTempFile instead of
fileInstance.createTempFile, use of StringBuilder instead of
StringBuffer, use of String.charAt instead of StringCharacterIterator,
and so on) and code/comment reformatting to conventional standards.