private void openFile(final File file,
Filter<ProtocolFilterTarget> protocolFilter) throws IOException,
FileFormatException {
if (file.canRead() == false) {
throw new FileNotFoundException("File [" + file.getName()
+ "] is not readable, can not open in [" + this.mode.toString()
+ "]mode");
}
if (this.mode.isAppend() || this.mode.isContent()
|| this.mode.isStructure()) {
if (file.canWrite() == false) {
throw new FileNotFoundException("File [" + file.getName()
+ "] is readonly, can not open in read-write mode");
}
}
this.editor = new FileEditorImpl(file, this.mode, headerReader,