Comment #2 on issue 620 by [email protected]: Concerting ByteString to String
http://code.google.com/p/protobuf/issues/detail?id=620

attached is the protobuff file and below is the code for the conversion

public static String AdXRequest(Object O, Concept req) {
                String ps=null,Impmimes=null,VImpmimes=null;
                int index=0;
                if (O instanceof byte[]){               
                
            byte[] by = (byte[]) O;
            try{
            BidRequest a = BidRequest.parseFrom(by);
                ps = a.toString();
                
            }catch(Exception e){
                ps = "exception on parseFrom::" + e.getStackTrace();
            }
                                
        }else{
                ps = "Object is not a byte array.";
        }

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to