diff options
author | 2013-08-21 22:39:47 -0700 | |
---|---|---|
committer | 2013-08-21 22:39:47 -0700 | |
commit | fb5c3956fd167bfa9dc7764d158d266380f88f28 (patch) | |
tree | d8dbdf10b7acc25c73ea4c14f37bcb507ff40f02 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | |
parent | a58953b823000e191e8dd1baf14169f0b2e90219 (diff) | |
parent | fef693ea983eb4aacd3d1830e5d7608ede8ad451 (diff) | |
download | latinime-fb5c3956fd167bfa9dc7764d158d266380f88f28.tar.gz latinime-fb5c3956fd167bfa9dc7764d158d266380f88f28.tar.xz latinime-fb5c3956fd167bfa9dc7764d158d266380f88f28.zip |
am fef693ea: Merge "Add DictEncoder."
* commit 'fef693ea983eb4aacd3d1830e5d7608ede8ad451':
Add DictEncoder.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java index f30be97f3..83ccdec59 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java @@ -32,7 +32,6 @@ import com.android.inputmethod.latin.utils.CollectionUtils; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; @@ -204,17 +203,14 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { long now = -1, diff = -1; try { - final FileOutputStream out = new FileOutputStream(file); + final DictEncoder dictEncoder = new Ver3DictEncoder(file); now = System.currentTimeMillis(); // If you need to dump the dict to a textual file, uncomment the line below and the // function above // dumpToCombinedFileForDebug(file, "/tmp/foo"); - BinaryDictEncoderUtils.writeDictionaryBinary(out, dict, formatOptions); + dictEncoder.writeDictionary(dict, formatOptions); diff = System.currentTimeMillis() - now; - - out.flush(); - out.close(); } catch (IOException e) { Log.e(TAG, "IO exception while writing file", e); } catch (UnsupportedFormatException e) { |