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

* commit '7faf750f4a0868afd2d0692a96794ccecb2ede28':
  Make readUnigramsAndBigramsBinary read linked-list nodes.
main
Yuichiro Hanada 2012-09-20 09:29:39 -07:00 committed by Android Git Automerger
commit 6c2bd05b7e
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();