return true;
}
@Override
public boolean load(InputStream input) throws IOException {
DataInput in = new InputStreamDataInput(input);
CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_START);
byte separatorOrig = in.readByte();
if (separatorOrig != separator) {
throw new IllegalStateException("separator=" + separator + " is incorrect: original model was built with separator=" + separatorOrig);
}
int gramsOrig = in.readVInt();
if (gramsOrig != grams) {
throw new IllegalStateException("grams=" + grams + " is incorrect: original model was built with grams=" + gramsOrig);
}
totTokens = in.readVLong();
fst = new FST<Long>(in, PositiveIntOutputs.getSingleton());
return true;
}