Make readUnigramsAndBigramsBinary read linked-list nodes.
Change-Id: I07ae036b0b06e71d7a18f2bf11e4692cd4213568main
parent
54717534b1
commit
73779f7631
|
@ -92,7 +92,18 @@ public class BinaryDictIOUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p.mPosition == p.mNumOfCharGroup) {
|
if (p.mPosition == p.mNumOfCharGroup) {
|
||||||
|
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();
|
stack.pop();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
stack.pop();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// the node has more groups.
|
// the node has more groups.
|
||||||
p.mAddress = buffer.position();
|
p.mAddress = buffer.position();
|
||||||
|
|
Loading…
Reference in New Issue