试图从字节中解析bidrequest,但是却出现如下异常,已经搜索了很长时间但是找不到解决方案。如果有人知道的话,请提供帮助。
//Bidrequest json string fetched from httpRequest
String obj = request.getReader().lines().collect(Collectors.joining());
ExtensionRegistry reg = ExtensionRegistry.newInstance();
AdxExt.registerAllExtensions(reg);
InputStream input = new ByteArrayInputStream(obj.getBytes(),0,obj.getBytes().length);
BidRequest openRTBRequest =BidRequest.parseFrom(input,reg);