From e9a10ff0f026b5ec458f116afc7a75806574cbcd Mon Sep 17 00:00:00 2001 From: Yuichiro Hanada Date: Thu, 22 Aug 2013 22:43:20 +0900 Subject: Add DictDecoder.readDictionaryBinary. Bug: 10434720 Change-Id: I14690a6e0f922ed1bab3a4b6c9a457ae84d4c1a4 --- .../inputmethod/latin/makedict/BinaryDictDecoderUtils.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java') 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(); -- cgit v1.2.3-83-g751a