Protobuf ByteString to String in java

1.6k views Asked by At

I tried to convert Protobuf ByteString to java String but getting this as result.

<ByteString@4cd1c1f6 size=11 contents="\b\350\210\206\226\201\302\3658\020\005">

It is supposed to be string with date and time.

Inside *.proto file DateTime field looks like this:

bytes DateTime = 2;

I tried string DateTime, but then I get "Protocol message had invalid UTF-8." exception.

Thank you!

0

There are 0 answers