Thanks!
That's right what I needed. And one more question - will sub-builders
be introduced for lite package?

On 6 янв, 08:44, Pherl Liu <[email protected]> wrote:
> You can try:
>
> InfoClass.Builder builder = info.toBuilder();
> builder.getKeyBuilder().getPrivateBuilder().setD(ByteString.copyFrom(decryp­tedPrivateKey));
> info = builder.build();
>
>
>
> On Thu, Jan 6, 2011 at 5:06 AM, Scratch <[email protected]> wrote:
> > Hi there!
> > I've seen that there're new sub-builders for sub-messages (Java) but
> > couldn`t figure out how to use them properly. My task is to replace a
> > single field in a message and right now I solve it like this:
>
> > //replace encrypted key with decrypted one
> > info =
>
> > info.toBuilder().setKey(info.getKey().toBuilder().setPrivate(ECPrivateKey.n­ewBuilder().setD(ByteString.copyFrom(decryptedPrivateKey)).build()).build()­).build();
>
> > which looks pretty ugly to me.
> > Will new sub-builders help me in this situation?
> > Thanks in advance.
>
> > --
> > 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]<protobuf%[email protected]­om>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/protobuf?hl=en.

-- 
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