question: public void writeAsReference ( ) throws IOException { File parent = m_RefFile . getParentFile ( ) ; if ( ! parent . exists ( ) ) { parent . mkdirs ( ) ; } Writer w = new BufferedWriter ( new FileWriter ( m_RefFile ) ) ; w . write ( m_Output . toString ( ) ) ; w . close ( ) ; }
target:  Writes the current output as the new reference. Normally this method is called automatically if diff() is called with no existing reference version. You may wish to call it explicitly if you know you want to create the reference version.