Your approach actually won't work (at least, as you've written the code)
because if you write two messages to a stream without any sort of delimiter,
it's impossible to figure out later where one message ends and the other
starts.
But I suggest doing this instead:
message A {
...
}
message B {
Hi again,
I have two classes where B extends from A. Since both classes are
legacy and as far as I understood protocol buffers I write a proto
file for class A. For serialization and deserialization I just add the
methods writeObject() and readObject() to class A.
Now I wonder how to write the p