I just created a question about hapi a while ago and another question crossed my mind that is not exactly the same but related:
Is it possible to create
messages and not just read them?
I mean, something like this:
Message ack = new AbstractMessage();
Segment msh = new AbstractSegment("MSH");
// setting the values for the fields of the MSH segment
msh.getField(12).setValue("2.3"); // setting the version to 2.3
Segment msa = new AbstractSegment("MSA");
Or something along those lines.
Thanks in advance.