下面列出了com.google.protobuf.GeneratedMessageV3#toByteString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* post(receive ProtoBuff)
* @param url
* @param body
* @param exts
* @param resultCall
*/
public void postEncrySelf(String url, GeneratedMessageV3 body,SupportKeyUril.EcdhExts exts, final ResultCall resultCall){
LogManager.getLogger().http("param:" + body.toString());
ByteString bytes = body == null ? ByteString.copyFrom(new byte[]{}) : body.toByteString();
Connect.IMRequest imRequest = getIMRequest(exts,MemoryDataManager.getInstance().getPriKey(),
MemoryDataManager.getInstance().getPubKey(),bytes);
if(null == imRequest)
return;
HttpRequest.getInstance().post(url,imRequest,resultCall);
}
/**
* post(receive ProtoBuff)
* @param url
* @param body
* @param resultCall
*/
public void postEncrySelf(String url, GeneratedMessageV3 body, final ResultCall resultCall){
LogManager.getLogger().http("param:" + body.toString());
ByteString bytes = body == null ? ByteString.copyFrom(new byte[]{}) : body.toByteString();
postEncrySelf(url,bytes,resultCall);
}
/**
* post(receive ProtoBuff)
* @param url
* @param body
* @param exts
* @param priKey
* @param pubKey
* @param resultCall
*/
public void postEncry(String url, GeneratedMessageV3 body, SupportKeyUril.EcdhExts exts, String priKey, String pubKey,final ResultCall resultCall){
LogManager.getLogger().http("param:" + body.toString());
ByteString bytes = body == null ? ByteString.copyFrom(new byte[]{}) : body.toByteString();
postEncry(url,bytes,exts,priKey,pubKey,resultCall);
}