code: private KieServerHttpRequest copy(final InputStream input, final OutputStream output ) throws IOException {
          return new CloseOperation<KieServerHttpRequest>(input, ignoreCloseExceptions) {
  
              @Override
              public KieServerHttpRequest run() throws IOException {
                  final byte[] buffer = new byte[bufferSize];
                  int read;
                  while( (read = input.read(buffer)) != -1 ) {
                      output.write(buffer, 0, read);
                  }
                  return KieServerHttpRequest.this;
              }
          }.call();
      }
docs: Copy from input stream to output stream
  
  @param input
  @param output
  @return this request
  @throws IOException