/** * @param file * @param write * @param fs * @return SqlJetDb object for opened database * @throws SqlJetException */ public static SqlJetDb open(File file, boolean write, final ISqlJetFileSystem fs) throws SqlJetException { final SqlJetDb db = new SqlJetDb(file, write, fs); db.open(); return db; }
/** * @param file * @param write * @param fsName * @return SqlJetDb object for opened database * @throws SqlJetException */ public static SqlJetDb open(File file, boolean write, final String fsName) throws SqlJetException { final SqlJetDb db = new SqlJetDb(file, write, fsName); db.open(); return db; }
/** * <p> * Opens connection to data base. It does not create any locking on * database. First lock will be created when be called any method which * requires real access to options or schema. * <p> * * <p> * File could be null or have special value {@link #IN_MEMORY}. If file is * null then will be created temporary file which will be deleted at close. * If file is {@link #IN_MEMORY} then file doesn't created and instead * database will placed in memory. If regular file is specified but doesn't * exist then it will be tried to created. * </p> * * @param file * path to data base. Could be null or {@link #IN_MEMORY}. * @param write * open for writing if true. * @throws SqlJetException * if any trouble with access to file or database format. */ public static SqlJetDb open(File file, boolean write) throws SqlJetException { final SqlJetDb db = new SqlJetDb(file, write); db.open(); return db; }