* @param predicted is the total number after the write completes
*/
private void thresholdReached(int current, int predicted) throws IOException
{
this.outFile = File.createTempFile(TMPFILE_PREFIX, TMPFILE_SUFFIX);
TempFiles tempFiles = Config.getFileSystem().getTempFiles();
tempFiles.markForDeletion(outFile);
if (log.isDebugEnabled())
log.debug("Writing message to file : " + outFile.getAbsoluteFile().getName());
this.stream = new FileOutputStream(this.outFile);
this.stream.write(this.buffer.array());