aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-08-22 22:43:20 +0900
committerYuichiro Hanada <yhanada@google.com>2013-08-23 20:29:25 +0900
commite9a10ff0f026b5ec458f116afc7a75806574cbcd (patch)
treeb50ff7fc7e7b4a71db9410bfea829905f00817fb /java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
parentb64157bf4720dfc2aa40ad8e6806459012f81082 (diff)
downloadlatinime-e9a10ff0f026b5ec458f116afc7a75806574cbcd.tar.gz
latinime-e9a10ff0f026b5ec458f116afc7a75806574cbcd.tar.xz
latinime-e9a10ff0f026b5ec458f116afc7a75806574cbcd.zip
Add DictDecoder.readDictionaryBinary.
Bug: 10434720 Change-Id: I14690a6e0f922ed1bab3a4b6c9a457ae84d4c1a4
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
index b82b41c7d..8b1d60b39 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
@@ -559,17 +559,9 @@ public final class BinaryDictDecoderUtils {
* @return the created (or merged) dictionary.
*/
@UsedForTesting
- public static FusionDictionary readDictionaryBinary(final Ver3DictDecoder dictDecoder,
+ /* package */ static FusionDictionary readDictionaryBinary(final Ver3DictDecoder dictDecoder,
final FusionDictionary dict) throws FileNotFoundException, IOException,
UnsupportedFormatException {
-
- // if the buffer has not been opened, open the buffer with bytebuffer.
- if (dictDecoder.getDictBuffer() == null) dictDecoder.openDictBuffer(
- new Ver3DictDecoder.DictionaryBufferFromReadOnlyByteBufferFactory());
- if (dictDecoder.getDictBuffer() == null) {
- MakedictLog.e("Cannot open the buffer");
- }
-
// Read header
final FileHeader fileHeader = dictDecoder.readHeader();