am 73779f76: Make readUnigramsAndBigramsBinary read linked-list nodes.

* commit '73779f7631d41f16f89c62cae09a1b27d8189dc3':
  Make readUnigramsAndBigramsBinary read linked-list nodes.
main
Yuichiro Hanada 2012-09-20 06:24:11 -07:00 committed by Android Git Automerger
commit 6f3f3951c2
1 changed files with 12 additions and 1 deletions

View File

@ -92,7 +92,18 @@ public class BinaryDictIOUtils {
}
if (p.mPosition == p.mNumOfCharGroup) {
stack.pop();
if (formatOptions.mHasLinkedListNode) {
final int forwardLinkAddress = buffer.readUnsignedInt24();
if (forwardLinkAddress != FormatSpec.NO_FORWARD_LINK_ADDRESS) {
// the node has a forward link.
p.mNumOfCharGroup = Position.NOT_READ_GROUPCOUNT;
p.mAddress = forwardLinkAddress;
} else {
stack.pop();
}
} else {
stack.pop();
}
} else {
// the node has more groups.
p.mAddress = buffer.position();