]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/engine/Dictionary.java
List broken/corrupted dictionaries in list.
[Dictionary.git] / src / com / hughes / android / dictionary / engine / Dictionary.java
index 4b64a14ded7b70258a4a7ed6a087f251c67eb531..1a57d89c44942094e996613e1ee62bdca6030ec3 100644 (file)
@@ -125,8 +125,9 @@ public class Dictionary implements RAFSerializable<Dictionary> {
         RAFList.write(raf, pairEntries, new PairEntry.Serializer(this), 64, true);
         System.out.println("text start: " + raf.getFilePointer());
         RAFList.write(raf, textEntries, new TextEntry.Serializer(this));
-        System.out.println("html start: " + raf.getFilePointer());
+        System.out.println("html index start: " + raf.getFilePointer());
         RAFList.write(raf, htmlEntries, new HtmlEntry.Serializer(this), 64, true);
+        System.out.println("html data start: " + raf.getFilePointer());
         assert htmlData == null;
         RAFList.write(raf, htmlEntries, new HtmlEntry.DataSerializer(), 128, true);
         System.out.println("indices start: " + raf.getFilePointer());
@@ -193,7 +194,10 @@ public class Dictionary implements RAFSerializable<Dictionary> {
             raf.close();
             return dictionaryInfo;
         } catch (IOException e) {
-            return null;
+            final DictionaryInfo dictionaryInfo = new DictionaryInfo();
+            dictionaryInfo.uncompressedFilename = file.getName();
+            dictionaryInfo.uncompressedBytes = file.length();
+            return dictionaryInfo;
         } finally {
             if (raf != null) {
                 try {