I am having the following error when trying to read the message in java
Exception in thread \"main\" com.google.protobuf.InvalidProtocolBufferException: Prot
I very much doubt that you're getting the exception there - I'd expect you to get it in parseFrom. Could you post the full stack trace instead of just the first three lines?
I strongly suspect you've basically got a broken file. The fact that you've given a .txt extension for what should be a binary file is somewhat suspect... what does the file actually look like? You don't use parseFrom like this to parse an ASCII representation of a protobuf message.
EDIT: As per the question linked in the comment, you're trying to parse a text file using a method designed for binary data.
You want to use something like:
// Use the normal try/finally for closing reliably
InputStreamReader reader = new InputStreamReader(fis, "ASCII");
Nt.Builder builder = Nt.newBuilder();
TextFormat.merge(reader, builder);
Nt nt = builder.build();