private void saveFeatureIndexes(FeatureIndex[] index, ZipModel model) throws IOException
	{
		logger.info("save feature index (" + index.length + ")");

		// save the indexes
		for (int i=0;i<index.length;i++)
		{
			logger.debug("dic" + i + " size " + index[i].size());

			File tmp = File.createTempFile("dic" + i, null);
			tmp.deleteOnExit();

			BufferedWriter bwd = new BufferedWriter(new FileWriter(tmp));
			index[i].write(bwd);
			bwd.close();

			// add the dictionary to the model
			model.add(tmp, "dic" + i);
		} // end for
	}
private void saveFeatureIndexes ( FeatureIndex [ ] index , ZipModel model ) throws IOException { logger . info ( "save feature index (" + index . length + ")" ) ; for ( int i = 0 ; i < index . length ; i ++ ) { logger . debug ( "dic" + i + " size " + index [ i ] . size ( ) ) ; File tmp = File . createTempFile ( "dic" + i , null ) ; tmp . deleteOnExit ( ) ; BufferedWriter bwd = new BufferedWriter ( new FileWriter ( tmp ) ) ; index [ i ] . write ( bwd ) ; bwd . close ( ) ; model . add ( tmp , "dic" + i ) ; } }
save feature index