Common tasks I do often, already done.
IOUtils.copy(inputstream, outputstream) : No more while loop and byte buffer.
IOUtils.toByteArray(inputstream) : no more ByteArrayOutputStream.
IOUtils.toString(reader) : no more StringWriter.
I’ve praised IOUtils before in a previous post.