From f07f81fdfcab78c10488000327b1ee07a133c3c6 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Wed, 3 Nov 2010 00:01:38 +0000 Subject: [PATCH] add FileFormat.MSISAM git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@495 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/Database.java | 3 ++- src/java/com/healthmarketscience/jackcess/JetFormat.java | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java index 9240d32..f84d79a 100644 --- a/src/java/com/healthmarketscience/jackcess/Database.java +++ b/src/java/com/healthmarketscience/jackcess/Database.java @@ -188,7 +188,8 @@ public class Database V1997(null, JetFormat.VERSION_3), V2000("com/healthmarketscience/jackcess/empty.mdb", JetFormat.VERSION_4), V2003("com/healthmarketscience/jackcess/empty2003.mdb", JetFormat.VERSION_4), - V2007("com/healthmarketscience/jackcess/empty2007.accdb", JetFormat.VERSION_5, ".accdb"); + V2007("com/healthmarketscience/jackcess/empty2007.accdb", JetFormat.VERSION_5, ".accdb"), + MSISAM(null, JetFormat.VERSION_MSISAM, ".mny"); private final String _emptyFile; private final JetFormat _format; diff --git a/src/java/com/healthmarketscience/jackcess/JetFormat.java b/src/java/com/healthmarketscience/jackcess/JetFormat.java index 4689797..1453f7d 100644 --- a/src/java/com/healthmarketscience/jackcess/JetFormat.java +++ b/src/java/com/healthmarketscience/jackcess/JetFormat.java @@ -117,6 +117,9 @@ public abstract class JetFormat { private static final Map POSSIBLE_VERSION_5 = Collections.singletonMap(Database.FileFormat.V2007, (byte[])null); + private static final Map POSSIBLE_VERSION_MSISAM = + Collections.singletonMap(Database.FileFormat.MSISAM, (byte[])null); + static { POSSIBLE_VERSION_4.put(Database.FileFormat.V2000, ACCESS_VERSION_2000); POSSIBLE_VERSION_4.put(Database.FileFormat.V2003, ACCESS_VERSION_2003); @@ -851,6 +854,12 @@ public abstract class JetFormat { protected CodecType defineCodecType() { return CodecType.MSISAM; } + + @Override + protected Map getPossibleFileFormats() + { + return PossibleFileFormats.POSSIBLE_VERSION_MSISAM; + } } private static final class Jet5Format extends Jet4Format { -- 2.39.5