private void openFile(final File file, Filter<ProtocolFilterTarget> filter)
throws IOException, FileFormatException {
if (file.canRead() == false) {
throw new FileNotFoundException("File [" + file.getName()
+ "] is not readable, can not open in [" + mode.toString() + "]mode");
}
if (mode.isAppend() || mode.isContent() || 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,