diff options
author | 2013-08-20 21:35:21 +0900 | |
---|---|---|
committer | 2013-08-22 11:53:41 +0900 | |
commit | c922c8a504ab31aae26193f1bf319bf9f91406a5 (patch) | |
tree | 63e5361d7569bba59545a7fc48319f31ef7975fa /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | |
parent | f9233e0b98469a7e9e9a863d491a33593dba4bff (diff) | |
download | latinime-c922c8a504ab31aae26193f1bf319bf9f91406a5.tar.gz latinime-c922c8a504ab31aae26193f1bf319bf9f91406a5.tar.xz latinime-c922c8a504ab31aae26193f1bf319bf9f91406a5.zip |
Add DictEncoder.
Change-Id: I41049b9118b58838e5dedf8e5618d939ca70c5ef
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) { |