Use Apache Commons IO to manipulate streams

Apache Commons IO is part of the dependencies. Therefore, it is preferable to use it than rewriting stream manipulations.