Re: output streams

2009-07-02 Thread Kenton Varda
You have to flush the CodedOutputStream. You should just do this instead: byte[] data = person.build().toByteArray(); On Thu, Jul 2, 2009 at 12:44 AM, J.V. jvsr...@gmail.com wrote: I'm trying to get the following to work but nothing is being written to the output stream. any ideas?

Re: output streams

2009-07-02 Thread J.V.
Thanks, for some reason I'm' getting the same error. If you have an example of encoding to a stream and then decoding, it would be greatly appreciated. I will get it fully working and update the tutorial or post it somewhere if desired. thanks jrv Kenton Varda wrote: You have to flush the

Re: output streams

2009-07-02 Thread Kenton Varda
Write to a stream: message.writeTo(stream); Parse from a stream: message = MyType.parseFrom(stream); If you need to read/write multiple messages on the same stream (or the stream does not end immediately after the first message), use writeDelimitedTo() and parseDelimitedFrom(). On Thu, Jul