示例#1
0
  /** We've received a response from the API so parse it out. */
  protected List<ResultType> protobufParse(ContentApi.Response response, Config<ResultType> config)
      throws Exception {

    return protobufParse(response.getEntryList(), config);
  }
示例#2
0
 public ContentApi.Response doProtobufFetch(InputStream inputStream, Config<?> config)
     throws IOException, InterruptedException {
   CodedInputStream cis = CodedInputStream.newInstance(inputStream);
   cis.setSizeLimit(PROTOBUF_SIZE_LIMIT);
   return ContentApi.Response.parseFrom(cis);
 }