code: @Override
  public synchronized void  close(TaskAttemptContext context) throws IOException {
  
  		try {
  			this.officeWriter.close();
  		}  finally {
  			if (this.out!=null) {
  				this.out.close();
  			}
  			if (this.currentReader!=null) {
  				this.currentReader.close();
  			}
  		}
  	
  	
   }
docs: *
  
  This method closes the document and writes it into the OutputStream