I probably just messed up something in my proto file but I can't seem to call the toByteArray function.
Using Java and the proto file was compiled with protoc.
What I'm calling...
BaseMessage.builder = baseMessage = BaseMessage.newBuilder();
Acknowledgement.builder = acknowledgeMessage = Acknowledgement.newBuilder();
acknowledgeMessage.setOk(true);
baseMessage.setAcknowledgement(acknowledgeMessage);
baseMessage.build();
byte[] send = baseMessage.toByteArray();
And BaseMessage is declared as...
public static final class BaseMessage
extends com.google.protobuf.GeneratedMessage
implements BaseMessageOrBuilder {
Maybe I'm missing somthing...
BaseMessage is extending GeneratedMessage which inherits toByteArray() from AbstractMessageLite in which toByteArray is public... So I should be able to use it?