View Javadoc
1   package com.foxinmy.weixin4j.model.media;
2   
3   import java.io.Serializable;
4   
5   import com.foxinmy.weixin4j.http.ContentType;
6   
7   /**
8    * 媒体文件下载结果
9    * 
10   * @className MediaDownloadResult
11   * @author jinyu(foxinmy@gmail.com)
12   * @date 2015年7月25日
13   * @since JDK 1.6
14   * @see
15   */
16  public class MediaDownloadResult implements Serializable {
17  
18  	private static final long serialVersionUID = -7090523911701729058L;
19  	/**
20  	 * 内容
21  	 */
22  	private byte[] content;
23  	/**
24  	 * 类型
25  	 */
26  	private ContentType contentType;
27  	/**
28  	 * 文件名
29  	 */
30  	private String fileName;
31  
32  	public byte[] getContent() {
33  		return content;
34  	}
35  
36  	public ContentType getContentType() {
37  		return contentType;
38  	}
39  
40  	public String getFileName() {
41  		return fileName;
42  	}
43  
44  	public MediaDownloadResult(byte[] content, ContentType contentType,
45  			String fileName) {
46  		this.content = content;
47  		this.contentType = contentType;
48  		this.fileName = fileName;
49  	}
50  
51  	@Override
52  	public String toString() {
53  		return "MediaDownloadResult [content=..., contentType=" + contentType
54  				+ ", fileName=" + fileName + "]";
55  	}
56  }