aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2019-07-21 02:02:53 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2019-07-21 02:02:53 +0000
commit6460b475988b3c005efd69bcab8a64bbb41abdae (patch)
tree3df75ba000c87f582df568fcae281e8807036a72
parent34f4e4d4d5113be9e2d13156cc477f3a7af072e6 (diff)
downloadjackcess-6460b475988b3c005efd69bcab8a64bbb41abdae.tar.gz
jackcess-6460b475988b3c005efd69bcab8a64bbb41abdae.zip
add convenience method for opening with Path
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1302 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/DatabaseBuilder.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/DatabaseBuilder.java b/src/main/java/com/healthmarketscience/jackcess/DatabaseBuilder.java
index da9681e..6c46729 100644
--- a/src/main/java/com/healthmarketscience/jackcess/DatabaseBuilder.java
+++ b/src/main/java/com/healthmarketscience/jackcess/DatabaseBuilder.java
@@ -307,6 +307,20 @@ public class DatabaseBuilder
}
/**
+ * Open an existing Database. If the existing file is not writeable, the
+ * file will be opened read-only. Auto-syncing is enabled for the returned
+ * Database.
+ *
+ * @param mdbFile File containing the database
+ *
+ * @see DatabaseBuilder for more flexible Database opening
+ * @usage _general_method_
+ */
+ public static Database open(Path mdbFile) throws IOException {
+ return new DatabaseBuilder(mdbFile).open();
+ }
+
+ /**
* Create a new Database for the given fileFormat
*
* @param fileFormat version of new database.