/** * Copyright (c) 2011-2014, James Zhan 詹波 (inlet@126.com). * * Licensed under the Apache License, Version 2.0 (the "License"); */ package com.zzwtec.wechat.sdk.msg.out; import com.zzwtec.wechat.sdk.msg.in.InMsg; /** *
回复语音消息
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[voice]]></MsgType>
<Voice>
<MediaId><![CDATA[media_id]]></MediaId>
</Voice>
</xml>
*/
@SuppressWarnings("serial")
public class OutVoiceMsg extends OutMsg {
private String mediaId;
public OutVoiceMsg() {
this.msgType = "voice";
}
public OutVoiceMsg(InMsg inMsg) {
super(inMsg);
this.msgType = "voice";
}
@Override
protected void subXml(StringBuilder sb) {
if (null == mediaId) {
throw new NullPointerException("mediaId is null");
}
sb.append("