private void commonInitializer(File file) throws IOException { File parent = file.getParentFile(); if (parent == null) parent = new File(System.getProperty("user.dir")); if (!parent.canWrite()) { String msg = Logging.getMessage("generic.FolderNoWritePermission", parent.getAbsolutePath()); Logging.logger().severe(msg); throw new IllegalArgumentException(msg); } this.targetFile = new RandomAccessFile(file, "rw"); this.theChannel = this.targetFile.getChannel(); }