Recently, I want to write an application using netty.The format of message I want to send is serialized object stream using Avro or Protobuf. There exists one question for me, that is while one side receive the byte streams from the other side, how could I split the byte stream,or how could I know if such stream terminated,and ready for the next serialized objects? I get some tips that is using special characters between different object byte stream,but doesn't avro or protobuf will generate such characters while serialize objects?