Updates:
Labels: FixedIn-2.4.1
Comment #9 on issue 256 by jas...@google.com: Error Converting Message to
array of Bytes (When negative Enum) - Java
http://code.google.com/p/protobuf/issues/detail?id=256
2.4.1 should have contained this fix. Can you post a reproduction? If your
serialization does not have a negative enum value, then please open a
separate issue - the exception can occur generally when the ByteSize
computation does not match the size of data written by the serializer.
There is no message level interface, but you can just create the
CodedOutputStream around your OutputStream directly:
http://code.google.com/apis/protocolbuffers/docs/reference/java/com/google/protobuf/CodedOutputStream.html#newInstance(java.io.OutputStream,
int)
However, I think you should only be getting the OutOfSpaceException if
you're using the byte[] version of the methods, in which case the data is
written directly to the array. You need to make sure that the byte array
you provide is sufficiently large.
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.