score:1

Accepted answer

You have to provide a CodedInputStream.

Change:

persons.mergeFrom(new FileInputStream("path_of_file"))

To:

persons.mergeFrom(CodedInputStream.newInstance(new FileInputStream("path_of_file")))

Related Query

More Query from same tag