headenc.encodeMainHeader();
//Initializes rate allocator, with proper header
// overhead. This will also encode all the data
try {
ralloc.initialize();
} catch (RuntimeException e) {
if (WRITE_ABORTED.equals(e.getMessage())) {
bwriter.close();
tmpFile.delete();
processWriteAborted();