Clear all bytes writen so far, is there a way to do this with protobuf?
+1
A:
When you say clear, are you asking to undo the bytes you have already written?
If you are using the FileOutputStream or OstreamOutputStream, then what you have written might not be clear-able, as it has already been saved to disk or streamed somewhere. If you are using an ArrayOutputStream (which you might be if you are going to be writing it to a socket), then you can undo by just recreating your ArrayOutputStream and pointing it at the same buffer again.
It would help if you showed us the code you are currently using, so we can better advise you.
bramp
2010-09-04 01:07:28