diff options
author | 2013-08-19 02:34:23 +0000 | |
---|---|---|
committer | 2013-08-19 02:34:23 +0000 | |
commit | a83e25642f1eae1412d85ce72f27601edd0ac10d (patch) | |
tree | 32d13d5b45981feb2206f0051d11df82ca08c657 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | |
parent | 8aaae56cf6694ec75043be56f1c7812a343b24d5 (diff) | |
parent | d794b42f983a4f9563ef0334ed0b8f9cb44e084d (diff) | |
download | latinime-a83e25642f1eae1412d85ce72f27601edd0ac10d.tar.gz latinime-a83e25642f1eae1412d85ce72f27601edd0ac10d.tar.xz latinime-a83e25642f1eae1412d85ce72f27601edd0ac10d.zip |
Merge "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, |