throw new FileNotFoundException("Unable to create new file ["
+ file.getName() + "]");
}
PcapFile capture = new PcapFileCapture(FileMode.ReadWrite, filter);
final FileEditor editor = new FileEditorImpl(file, FileMode.ReadWrite,
headerReader, order, filter, (RawIteratorBuilder) capture);
PcapBlockRecordImpl.createBlock(capture, editor);
editor.close(); // Flush and close
capture = new PcapFileCapture(file, mode, filter);
if (logger.isDebugEnabled()) {
logger.debug(file.getName() + ", mode=" + mode + ", order=" + order