code: public static void copyStream(final InputStream inputStream, final OutputStream outputStream) throws IOException,
              InterruptedException {
          copyStream(inputStream, outputStream, null);
      }
docs: Utility method to write given inputStream to given outputStream.
  
  @param inputStream  the inputStream to copy from.
  @param outputStream the outputStream to write to.
  @throws IOException          thrown if there was a problem reading from inputStream or writing to outputStream.
  @throws InterruptedException thrown if the thread is interrupted which indicates cancelling.