diff options
author | 2013-08-18 19:36:15 -0700 | |
---|---|---|
committer | 2013-08-18 19:36:15 -0700 | |
commit | 41aade7977ee7313df8aa25e34c026dc034c8673 (patch) | |
tree | 2cc24ab73a85d289d6ac841093c3efecb80ee84b /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | |
parent | 376457477f4118e2e8e4c5bb2df9679f6ab0b899 (diff) | |
parent | a83e25642f1eae1412d85ce72f27601edd0ac10d (diff) | |
download | latinime-41aade7977ee7313df8aa25e34c026dc034c8673.tar.gz latinime-41aade7977ee7313df8aa25e34c026dc034c8673.tar.xz latinime-41aade7977ee7313df8aa25e34c026dc034c8673.zip |
am a83e2564: Merge "Add HeaderReaderInterface."
* commit 'a83e25642f1eae1412d85ce72f27601edd0ac10d':
Add HeaderReaderInterface.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java index 70c77e4fa..be468c19b 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java @@ -497,21 +497,21 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { } // Tests for getTerminalPosition - private String getWordFromBinary(final BinaryDictReader reader, final int address) { - final FusionDictionaryBufferInterface buffer = reader.getBuffer(); + private String getWordFromBinary(final BinaryDictReader dictReader, final int address) { + final FusionDictionaryBufferInterface buffer = dictReader.getBuffer(); if (buffer.position() != 0) buffer.position(0); - FileHeader header = null; + FileHeader fileHeader = null; try { - header = BinaryDictDecoder.readHeader(buffer); + fileHeader = BinaryDictDecoder.readHeader(dictReader); } catch (IOException e) { return null; } catch (UnsupportedFormatException e) { return null; } - if (header == null) return null; - return BinaryDictDecoder.getWordAtAddress(buffer, header.mHeaderSize, - address - header.mHeaderSize, header.mFormatOptions).mWord; + if (fileHeader == null) return null; + return BinaryDictDecoder.getWordAtAddress(buffer, fileHeader.mHeaderSize, + address - fileHeader.mHeaderSize, fileHeader.mFormatOptions).mWord; } private long runGetTerminalPosition(final BinaryDictReader reader, final String word, int index, |