diff options
author | 2013-08-22 05:38:08 +0000 | |
---|---|---|
committer | 2013-08-22 05:38:09 +0000 | |
commit | fef693ea983eb4aacd3d1830e5d7608ede8ad451 (patch) | |
tree | d89e2aae9433f2604f71ff64471a710d4f01c7d8 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | |
parent | 198b52f6db07605147aac57e9a16e14128d8a1fc (diff) | |
parent | c922c8a504ab31aae26193f1bf319bf9f91406a5 (diff) | |
download | latinime-fef693ea983eb4aacd3d1830e5d7608ede8ad451.tar.gz latinime-fef693ea983eb4aacd3d1830e5d7608ede8ad451.tar.xz latinime-fef693ea983eb4aacd3d1830e5d7608ede8ad451.zip |
Merge "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) { |