code: @Deprecated // replace with StreamUtil.copyContentIntoOutputStream()
      private static void copyStream(InputStream input, OutputStream output) throws IOException {
          byte[] buffer = new byte[BUFFER_SIZE];
          int len;
          while ((len = input.read(buffer)) != -1) {
              output.write(buffer, 0, len);
          }
      }
docs: Copy stream.
  
  @param input the input
  @param output the output
  @throws IOException Signals that an I/O exception has occurred.