]> source.dussan.org Git - jackcess.git/commitdiff
add FileFormat.MSISAM
authorJames Ahlborn <jtahlborn@yahoo.com>
Wed, 3 Nov 2010 00:01:38 +0000 (00:01 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Wed, 3 Nov 2010 00:01:38 +0000 (00:01 +0000)
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
src/java/com/healthmarketscience/jackcess/JetFormat.java

index 9240d32fd35f1d4812155904c4cf9e9761eeb951..f84d79ad7c8b8a27193bdc6c92519b5b2d6c6fff 100644 (file)
@@ -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;
index 468979716b54a0efb8443b97e8eb151f97a05522..1453f7dbdd4244236563219945e3e6f5c00dac6e 100644 (file)
@@ -117,6 +117,9 @@ public abstract class JetFormat {
     private static final Map<Database.FileFormat,byte[]> POSSIBLE_VERSION_5 = 
       Collections.singletonMap(Database.FileFormat.V2007, (byte[])null);
 
+    private static final Map<Database.FileFormat,byte[]> 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<Database.FileFormat,byte[]> getPossibleFileFormats()
+    {
+      return PossibleFileFormats.POSSIBLE_VERSION_MSISAM;
+    }
   }
 
   private static final class Jet5Format extends Jet4Format {