On Wed, 5 Dec 2012 07:37:40 -0800 (PST)
valadas <[email protected]> wrote:

> *FileinputStream pipe = new FileinputStream(pipeName);*
> *char buffer = new char[4096];*
> ** 
> *pipe.read(buffer);*
> *
> MessagesProtos.OperationalMessage message = 
> MessagesProtos.OperationalMessage.parseFrom(buffer);
> 

Protobuf messages are binary. Use bytes here, not chars. In fact this
code shouldn’t even compile; java.io.FileInputStream doesn’t *have* a
read() method that takes a char array!

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to