use of com.qcloud.cos.internal.Unmarshallers in project cos-java-sdk-v5 by tencentyun.
the class CICommonDemo method processCINotifyResponse.
/**
* 本示例用于解析回调数据,可通过获取Unmarshallers来进行xml数据的解析
* 可以通过查看CosClient的接口获取到需要使用的xml解析器
*/
public static void processCINotifyResponse(String response) throws Exception {
// 这里以文档预览的任务回调为例
Unmarshallers.DescribeDocJobUnmarshaller describeDocJobUnmarshaller = new Unmarshallers.DescribeDocJobUnmarshaller();
InputStream is = new ByteArrayInputStream(response.getBytes());
DocJobResponse docJobResponse = describeDocJobUnmarshaller.unmarshall(is);
System.out.println(docJobResponse);
}
Aggregations