aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-08-12 14:47:20 +0900
committerYuichiro Hanada <yhanada@google.com>2013-08-13 19:55:05 +0900
commit3feacba1eb43fb906f50581df19ff2e468642ca8 (patch)
tree269cd27201fbfad661734ad12367d5f762881f11 /java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
parent7242bf1a159b909db8a7c74e786e2391a4361d85 (diff)
downloadlatinime-3feacba1eb43fb906f50581df19ff2e468642ca8.tar.gz
latinime-3feacba1eb43fb906f50581df19ff2e468642ca8.tar.xz
latinime-3feacba1eb43fb906f50581df19ff2e468642ca8.zip
Add BinaryDictReader.
Bug: 9618601 Change-Id: Ief07fa0c3c4f7f5999a3fafcef4e47b6b6fd8143
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
index 167c6915c..c7b063daf 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
@@ -145,21 +145,21 @@ public final class BinaryDictIOUtils {
* Reads unigrams and bigrams from the binary file.
* Doesn't make the memory representation of the dictionary.
*
- * @param buffer the buffer to read.
+ * @param reader the reader.
* @param words the map to store the address as a key and the word as a value.
* @param frequencies the map to store the address as a key and the frequency as a value.
* @param bigrams the map to store the address as a key and the list of address as a value.
* @throws IOException
* @throws UnsupportedFormatException
*/
- public static void readUnigramsAndBigramsBinary(final FusionDictionaryBufferInterface buffer,
+ public static void readUnigramsAndBigramsBinary(final BinaryDictReader reader,
final Map<Integer, String> words, final Map<Integer, Integer> frequencies,
final Map<Integer, ArrayList<PendingAttribute>> bigrams) throws IOException,
UnsupportedFormatException {
// Read header
- final FileHeader header = BinaryDictInputOutput.readHeader(buffer);
- readUnigramsAndBigramsBinaryInner(buffer, header.mHeaderSize, words, frequencies, bigrams,
- header.mFormatOptions);
+ final FileHeader header = BinaryDictInputOutput.readHeader(reader.getBuffer());
+ readUnigramsAndBigramsBinaryInner(reader.getBuffer(), header.mHeaderSize, words,
+ frequencies, bigrams, header.mFormatOptions);
}
/**