OPENNLP-849 Improve handling of InputStreams All InputStreams are now using the try-with-resources statement and some streams are now also closed correctly.