code: public void reset() throws IOException {
  		if (t1==null || t2==null) {
  			throw new IllegalStateException("Cannot swap after close.");
  		}
  		if (getOutput().length()>0) {
  			toggle = !toggle;
  			// reset the new output to length()=0
  			try (OutputStream unused = new FileOutputStream(getOutput())) {
  				//this is empty because we only need to close it
  			}
  		} else {
  			throw new IOException("Cannot swap to an empty file.");
  		}
  	}
docs: Resets the input and output file before writing to the output again
  
  @throws IOException
  An IOException is thrown if TempFileHandler has been
  closed or if the output file is open or empty.