question: public void testIncrementalSaver ( ) { int i ; File file ; if ( ! ( getSaver ( ) instanceof IncrementalConverter ) ) { return ; } try { file = new File ( m_ExportFilename ) ; if ( file . exists ( ) ) { file . delete ( ) ; } m_Saver . setFile ( new File ( m_ExportFilename ) ) ; m_Saver . setRetrieval ( AbstractSaver . INCREMENTAL ) ; m_Saver . setStructure ( new Instances ( m_Instances , 0 ) ) ; for ( i = 0 ; i < m_Instances . numInstances ( ) ; i ++ ) { m_Saver . writeIncremental ( m_Instances . instance ( i ) ) ; } m_Saver . writeIncremental ( null ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; fail ( "Incremental save failed: " + e . toString ( ) ) ; } }
target:  test the incremental save (via setFile(File)).