public class ProjectChannelBean {
    private String topicid;
    // 设置该标签是否可编辑，如果出现在我的频道中，且值为1，则可在右上角显示删除按钮
    private int editStatus;
    private String cid;
    private String tname;
    private String ename;
    // 标签类型，显示是我的频道还是更多频道
    private int tabType;
    private String tid;
    private String column;

    public ProjectChannelBean(){}

    public ProjectChannelBean(String tname, String tid){
        this.tname = tname;
        this.tid = tid;
    }

    public ProjectChannelBean(String tname, String column, String tid){
        this.tname = tname;
        this.column = column;
        this.tid = tid;
    }

    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    public int getTabType() {
        return tabType;
    }

    public void setTabType(int tabType) {
        this.tabType = tabType;
    }

    public int getEditStatus() {
        return editStatus;
    }

    public void setEditStatus(int editStatus) {
        this.editStatus = editStatus;
    }

    public String getTopicid() {
        return topicid;
    }

    public void setTopicid(String topicid) {
        this.topicid = topicid;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }
} public class IOUtils {
	/**
	 * 读取资源文件，将js方法以字符串方法返回
	 *
	 * @return
	 */
	public static String readFromFile(String filename) {
		// "js.txt"
		InputStream inStream = null;
		ByteArrayOutputStream outStream =null;
		try {
			inStream = UIUtils.getContext().getAssets().open(filename);
			outStream = new ByteArrayOutputStream();
			byte[] bytes = new byte[1024];
			int len = 0;
			while ((len = inStream.read(bytes)) > 0) {
				outStream.write(bytes, 0, len);
			}
			return outStream.toString();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			close(inStream);
			close(outStream);
		}
		return null;
	}

	/** 关闭流 */
	public static boolean close(Closeable io) {
		if (io != null) {
			try {
				io.close();
			} catch (IOException e) {
				LogUtils.e("IOUtils", e);
			}
		}
		return true;
	}
} public class ImageDetailBean {


    /**
     * autoid :
     * boardid : photoview_bbs
     * clientadurl :
     * commenturl : http://comment.tech.163.com/photoview_bbs/PHOT0DI900090AI2.html
     * cover : http://img4.cache.netease.com/photo/0009/2016-12-22/C8RQJVLT0AI20009.jpg
     * createdate : 2016-12-22 01:19:34
     * creator : 白鑫
     * datatime : 2016-12-24 12:33:55
     * desc : 一周外媒动物图片精选：会走路的鲨鱼
     * imgsum : 16
     * neteasecode :
     * photos : []
     * postid : PHOT0DI900090AI2
     * relatedids : []
     * reporter :
     * scover : http://img4.cache.netease.com/photo/0009/2016-12-22/s_C8RQJVLT0AI20009.jpg
     * series :
     * setname : 一周外媒动物图片精选：会走路的鲨鱼
     * settag : 动物
     * source : 网易科技
     * tcover : http://img4.cache.netease.com/photo/0009/2016-12-22/t_C8RQJVLT0AI20009.jpg
     * url : http://tech.163.com/photoview/0AI20009/13897.html
     */
    // 封面
    private String cover;
    // 创建日期
    private String createdate;
    // 创建者
    private String creator;
    private String datatime;
    // 图片文字描述
    private String desc;
    // 图片总数
    private String imgsum;
    // 图片文字id
    private String postid;
    // 文章来源
    private String source;
    // 文章的url地址
    private String url;

    public String getSetname() {
        return setname;
    }

    public void setSetname(String setname) {
        this.setname = setname;
    }

    private String setname;
    // 图片集合信息
    private List<PhotosBean> photos;

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getCreatedate() {
        return createdate;
    }

    public void setCreatedate(String createdate) {
        this.createdate = createdate;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getDatatime() {
        return datatime;
    }

    public void setDatatime(String datatime) {
        this.datatime = datatime;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getImgsum() {
        return imgsum;
    }

    public void setImgsum(String imgsum) {
        this.imgsum = imgsum;
    }

    public String getPostid() {
        return postid;
    }

    public void setPostid(String postid) {
        this.postid = postid;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public List<PhotosBean> getPhotos() {
        return photos;
    }

    public void setPhotos(List<PhotosBean> photos) {
        this.photos = photos;
    }

    public static class PhotosBean {
        /**
         * cimgurl : http://img3.cache.netease.com/photo/0009/2016-12-18/c_C8JSL7H10AI20009.jpg
         * imgtitle : 一周外媒动物图片精选
         * imgurl : http://img4.cache.netease.com/photo/0009/2016-12-18/C8JSL7H10AI20009.jpg
         * newsurl : #
         * note : （来源：网易科技）
         * photohtml : http://tech.163.com/photoview/0AI20009/13897.html#p=C8JSL7H10AI20009
         * photoid : C8JSL7H10AI20009
         * simgurl : http://img4.cache.netease.com/photo/0009/2016-12-18/s_C8JSL7H10AI20009.jpg
         * squareimgurl : http://img3.cache.netease.com/photo/0009/2016-12-18/400x400_C8JSL7H10AI20009.jpg
         * timgurl : http://img3.cache.netease.com/photo/0009/2016-12-18/t_C8JSL7H10AI20009.jpg
         */
        // 图片标题，不一定有
        private String imgtitle;
        // 当前图片的URL地址
        private String imgurl;
        // 新闻url，不移动有
        private String newsurl;
        // 图片描述或者来源
        private String note;
        // 单张图片的url地址（网页版）
        private String photohtml;
        // 图集的文章id
        private String photoid;

        public String getImgtitle() {
            return imgtitle;
        }

        public void setImgtitle(String imgtitle) {
            this.imgtitle = imgtitle;
        }

        public String getImgurl() {
            return imgurl;
        }

        public void setImgurl(String imgurl) {
            this.imgurl = imgurl;
        }

        public String getNewsurl() {
            return newsurl;
        }

        public void setNewsurl(String newsurl) {
            this.newsurl = newsurl;
        }

        public String getNote() {
            return note;
        }

        public void setNote(String note) {
            this.note = note;
        }

        public String getPhotohtml() {
            return photohtml;
        }

        public void setPhotohtml(String photohtml) {
            this.photohtml = photohtml;
        }

        public String getPhotoid() {
            return photoid;
        }

        public void setPhotoid(String photoid) {
            this.photoid = photoid;
        }
    }
} public class NewsDetailBean {
        private String body;
        private int replyCount;
        private String shareLink;
        private String digest;

        private String docid;
        private boolean picnews;
        private String title;
        private String tid;
        private String template;


        private String source;

        private String voicecomment;
        private String ptime;
        private List<?> users;
        private List<?> ydbaike;
        private List<LinkBean> link;
        private List<ImgBean> img;
        private List<VotesBean> votes;
        private List<TopiclistNewsBean> topiclist_news;
        private List<?> topiclist;
        private List<VideoBean> video;
        private List<?> boboList;


        public String getBody() {
            return body;
        }

        public void setBody(String body) {
            this.body = body;
        }

        public int getReplyCount() {
            return replyCount;
        }

        public void setReplyCount(int replyCount) {
            this.replyCount = replyCount;
        }

        public String getShareLink() {
            return shareLink;
        }

        public void setShareLink(String shareLink) {
            this.shareLink = shareLink;
        }

        public String getDigest() {
            return digest;
        }

        public void setDigest(String digest) {
            this.digest = digest;
        }



        public String getDocid() {
            return docid;
        }

        public void setDocid(String docid) {
            this.docid = docid;
        }

        public boolean isPicnews() {
            return picnews;
        }

        public void setPicnews(boolean picnews) {
            this.picnews = picnews;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTid() {
            return tid;
        }

        public void setTid(String tid) {
            this.tid = tid;
        }

        public String getTemplate() {
            return template;
        }

        public void setTemplate(String template) {
            this.template = template;
        }



        public String getSource() {
            return source;
        }

        public void setSource(String source) {
            this.source = source;
        }



        public String getVoicecomment() {
            return voicecomment;
        }

        public void setVoicecomment(String voicecomment) {
            this.voicecomment = voicecomment;
        }

        public String getPtime() {
            return ptime;
        }

        public void setPtime(String ptime) {
            this.ptime = ptime;
        }

        public List<?> getUsers() {
            return users;
        }

        public void setUsers(List<?> users) {
            this.users = users;
        }

        public List<?> getYdbaike() {
            return ydbaike;
        }

        public void setYdbaike(List<?> ydbaike) {
            this.ydbaike = ydbaike;
        }

        public List<LinkBean> getLink() {
            return link;
        }

        public void setLink(List<LinkBean> link) {
            this.link = link;
        }

        public List<ImgBean> getImg() {
            return img;
        }

        public void setImg(List<ImgBean> img) {
            this.img = img;
        }

        public List<VotesBean> getVotes() {
            return votes;
        }

        public void setVotes(List<VotesBean> votes) {
            this.votes = votes;
        }

        public List<TopiclistNewsBean> getTopiclist_news() {
            return topiclist_news;
        }

        public void setTopiclist_news(List<TopiclistNewsBean> topiclist_news) {
            this.topiclist_news = topiclist_news;
        }

        public List<?> getTopiclist() {
            return topiclist;
        }

        public void setTopiclist(List<?> topiclist) {
            this.topiclist = topiclist;
        }

        public List<VideoBean> getVideo() {
            return video;
        }

        public void setVideo(List<VideoBean> video) {
            this.video = video;
        }



        public List<?> getBoboList() {
            return boboList;
        }

        public void setBoboList(List<?> boboList) {
            this.boboList = boboList;
        }


        public static class LinkBean {
            /**
             * ref : <!--link0-->
             * title : 你的小目标达成了吗？
             * imgsrc : http://cms-bucket.nosdn.127.net/4bba72ca129c45b2bea3038fe450ef6420161223202339.jpeg
             * digest : 距存够2W的小目标还差3W
             * type : linkCard
             * href : http://3g.163.com/news/16/1223/20/C90EQK7D000181BT.html
             */

            private String ref;
            private String title;
            private String imgsrc;
            private String digest;
            private String type;
            private String href;

            public String getRef() {
                return ref;
            }

            public void setRef(String ref) {
                this.ref = ref;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getImgsrc() {
                return imgsrc;
            }

            public void setImgsrc(String imgsrc) {
                this.imgsrc = imgsrc;
            }

            public String getDigest() {
                return digest;
            }

            public void setDigest(String digest) {
                this.digest = digest;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getHref() {
                return href;
            }

            public void setHref(String href) {
                this.href = href;
            }
        }

        public static class ImgBean {
            /**
             * ref : <!--IMG#0-->
             * pixel : 690*692
             * alt :
             * src : http://cms-bucket.nosdn.127.net/c85eed9a823043249c9eeb99bca7f69e20161226084157.jpeg
             */

            private String ref;
            private String pixel;
            private String alt;
            private String src;

            public String getRef() {
                return ref;
            }

            public void setRef(String ref) {
                this.ref = ref;
            }

            public String getPixel() {
                return pixel;
            }

            public void setPixel(String pixel) {
                this.pixel = pixel;
            }

            public String getAlt() {
                return alt;
            }

            public void setAlt(String alt) {
                this.alt = alt;
            }

            public String getSrc() {
                return src;
            }

            public void setSrc(String src) {
                this.src = src;
            }
        }

        public static class VotesBean {
            /**
             * digest : 你们考过研吗？
             * date : 2016-12-26
             * url :
             * option_type : 0
             * date_type : 0
             * sumnum : 1109
             * docid :
             * ref : <!--@@PKVOTEID=58378-->
             * voteid : 58378
             * voteitem : [{"id":"247999","num":451,"name":"考过研，我当时____。"},{"id":"248000","num":658,"name":"没考过，想想都挺累。"}]
             * imgsrc :
             * voteType : pkVote
             * question : 你们考过研吗？
             */

            private String digest;
            private String date;
            private String url;
            private int option_type;
            private int date_type;
            private int sumnum;
            private String docid;
            private String ref;
            private String voteid;
            private String imgsrc;
            private String voteType;
            private String question;
            private List<VoteitemBean> voteitem;

            public String getDigest() {
                return digest;
            }

            public void setDigest(String digest) {
                this.digest = digest;
            }

            public String getDate() {
                return date;
            }

            public void setDate(String date) {
                this.date = date;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }

            public int getOption_type() {
                return option_type;
            }

            public void setOption_type(int option_type) {
                this.option_type = option_type;
            }

            public int getDate_type() {
                return date_type;
            }

            public void setDate_type(int date_type) {
                this.date_type = date_type;
            }

            public int getSumnum() {
                return sumnum;
            }

            public void setSumnum(int sumnum) {
                this.sumnum = sumnum;
            }

            public String getDocid() {
                return docid;
            }

            public void setDocid(String docid) {
                this.docid = docid;
            }

            public String getRef() {
                return ref;
            }

            public void setRef(String ref) {
                this.ref = ref;
            }

            public String getVoteid() {
                return voteid;
            }

            public void setVoteid(String voteid) {
                this.voteid = voteid;
            }

            public String getImgsrc() {
                return imgsrc;
            }

            public void setImgsrc(String imgsrc) {
                this.imgsrc = imgsrc;
            }

            public String getVoteType() {
                return voteType;
            }

            public void setVoteType(String voteType) {
                this.voteType = voteType;
            }

            public String getQuestion() {
                return question;
            }

            public void setQuestion(String question) {
                this.question = question;
            }

            public List<VoteitemBean> getVoteitem() {
                return voteitem;
            }

            public void setVoteitem(List<VoteitemBean> voteitem) {
                this.voteitem = voteitem;
            }

            public static class VoteitemBean {
                /**
                 * id : 247999
                 * num : 451
                 * name : 考过研，我当时____。
                 */

                private String id;
                private int num;
                private String name;

                public String getId() {
                    return id;
                }

                public void setId(String id) {
                    this.id = id;
                }

                public int getNum() {
                    return num;
                }

                public void setNum(int num) {
                    this.num = num;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }
            }
        }

        public static class TopiclistNewsBean {
            /**
             * hasCover : true
             * subnum : 超过1000万
             * alias : FUNNY MOMENT
             * tname : 轻松一刻
             * ename : qingsongyike
             * tid : T1350383429665
             * cid : C1348654575297
             */

            private boolean hasCover;
            private String subnum;
            private String alias;
            private String tname;
            private String ename;
            private String tid;
            private String cid;

            public boolean isHasCover() {
                return hasCover;
            }

            public void setHasCover(boolean hasCover) {
                this.hasCover = hasCover;
            }

            public String getSubnum() {
                return subnum;
            }

            public void setSubnum(String subnum) {
                this.subnum = subnum;
            }

            public String getAlias() {
                return alias;
            }

            public void setAlias(String alias) {
                this.alias = alias;
            }

            public String getTname() {
                return tname;
            }

            public void setTname(String tname) {
                this.tname = tname;
            }

            public String getEname() {
                return ename;
            }

            public void setEname(String ename) {
                this.ename = ename;
            }

            public String getTid() {
                return tid;
            }

            public void setTid(String tid) {
                this.tid = tid;
            }

            public String getCid() {
                return cid;
            }

            public void setCid(String cid) {
                this.cid = cid;
            }
        }

        public static class VideoBean {
            /**
             * commentid : C84JV7AL00964ILB
             * topicid : 0096
             * broadcast : in
             * videosource : 其他
             * commentboard : mobile_bbs
             * appurl :
             * mp4Hd_url : http://flv2.bn.netease.com/videolib3/1612/24/rbPOL1739/HD/rbPOL1739-mobile.mp4
             * url_m3u8 : http://flv2.bn.netease.com/videolib3/1612/24/rbPOL1739/SD/rbPOL1739-mobile.mp4
             * size :
             * ref : <!--VIDEO#0-->
             * cover : http://vimg2.ws.126.net/image/snapshot/2016/12/S/T/VC84JV4ST.jpg
             * url_mp4 : http://flv2.bn.netease.com/videolib3/1612/24/rbPOL1739/SD/rbPOL1739-mobile.mp4
             * alt : 年终策划视频《小时代之狗血2017》
             * mp4_url : http://flv2.bn.netease.com/videolib3/1612/24/rbPOL1739/SD/rbPOL1739-mobile.mp4
             * m3u8Hd_url : http://flv2.bn.netease.com/videolib3/1612/24/rbPOL1739/HD/movie_index.m3u8
             * m3u8_url : http://flv2.bn.netease.com/videolib3/1612/24/rbPOL1739/SD/movie_index.m3u8
             * vid : VC84JV7AL
             */

            private String commentid;
            private String topicid;
            private String broadcast;
            private String videosource;
            private String commentboard;
            private String appurl;
            private String mp4Hd_url;
            private String url_m3u8;
            private String size;
            private String ref;
            private String cover;
            private String url_mp4;
            private String alt;
            private String mp4_url;
            private String m3u8Hd_url;
            private String m3u8_url;
            private String vid;

            public String getCommentid() {
                return commentid;
            }

            public void setCommentid(String commentid) {
                this.commentid = commentid;
            }

            public String getTopicid() {
                return topicid;
            }

            public void setTopicid(String topicid) {
                this.topicid = topicid;
            }

            public String getBroadcast() {
                return broadcast;
            }

            public void setBroadcast(String broadcast) {
                this.broadcast = broadcast;
            }

            public String getVideosource() {
                return videosource;
            }

            public void setVideosource(String videosource) {
                this.videosource = videosource;
            }

            public String getCommentboard() {
                return commentboard;
            }

            public void setCommentboard(String commentboard) {
                this.commentboard = commentboard;
            }

            public String getAppurl() {
                return appurl;
            }

            public void setAppurl(String appurl) {
                this.appurl = appurl;
            }

            public String getMp4Hd_url() {
                return mp4Hd_url;
            }

            public void setMp4Hd_url(String mp4Hd_url) {
                this.mp4Hd_url = mp4Hd_url;
            }

            public String getUrl_m3u8() {
                return url_m3u8;
            }

            public void setUrl_m3u8(String url_m3u8) {
                this.url_m3u8 = url_m3u8;
            }

            public String getSize() {
                return size;
            }

            public void setSize(String size) {
                this.size = size;
            }

            public String getRef() {
                return ref;
            }

            public void setRef(String ref) {
                this.ref = ref;
            }

            public String getCover() {
                return cover;
            }

            public void setCover(String cover) {
                this.cover = cover;
            }

            public String getUrl_mp4() {
                return url_mp4;
            }

            public void setUrl_mp4(String url_mp4) {
                this.url_mp4 = url_mp4;
            }

            public String getAlt() {
                return alt;
            }

            public void setAlt(String alt) {
                this.alt = alt;
            }

            public String getMp4_url() {
                return mp4_url;
            }

            public void setMp4_url(String mp4_url) {
                this.mp4_url = mp4_url;
            }

            public String getM3u8Hd_url() {
                return m3u8Hd_url;
            }

            public void setM3u8Hd_url(String m3u8Hd_url) {
                this.m3u8Hd_url = m3u8Hd_url;
            }

            public String getM3u8_url() {
                return m3u8_url;
            }

            public void setM3u8_url(String m3u8_url) {
                this.m3u8_url = m3u8_url;
            }

            public String getVid() {
                return vid;
            }

            public void setVid(String vid) {
                this.vid = vid;
            }
        }

    @Override
    public String toString() {
        return "NewsDetailBean{" +
                "body='" + body + '\'' +
                '}';
    }
} public class NewsListNormalBean {

    /**
     * postid : C96SHSNS000181KT
     * url_3w : http://news.163.com/16/1226/08/C96SHSNS000181KT.html
     * votecount : 10343
     * replyCount : 11416
     * skipID : S1482709380297
     * ltitle : 港媒:首批苏-35战机抵达沧州 正式交付解放军
     * digest : 【环球网军事12月26日报道】据香港《东方日报》网站12月26日报道，中国去年底与俄罗斯达成协议，将会向俄方购入24架苏35战机，25日再有新消息传出。网传消息
     * skipType : special
     * url : http://3g.163.com/news/16/1226/08/C96SHSNS000181KT.html
     * specialID : S1482709380297
     * docid : C96SHSNS000181KT
     * title : 港媒:首批苏-35战机抵达沧州 正式交付解放军
     * source : 参考消息网
     * imgextra : [{"imgsrc":"http://cms-bucket.nosdn.127.net/416fb909a7be4ef0994a049dc72d798820161226090753.png"},{"imgsrc":"http://cms-bucket.nosdn.127.net/f6e9c067651a487c8bdf1e22e9580c6f20161226090753.png"}]
     * priority : 95
     * lmodify : 2016-12-26 09:12:44
     * boardid : news_junshi_bbs
     * subtitle :
     * imgsrc : http://cms-bucket.nosdn.127.net/740c55691b664c46a22e5d3216b1ece320161226090753.png
     * ptime : 2016-12-26 08:23:30
     */
    // 文章发布时的id
    private String postid;
    // 网页链接地址
    private String url_3w;
    private int votecount;
    // 回帖人数
    private int replyCount;
    private String skipID;
    private String ltitle;
    // 文章描述
    private String digest;
    private String skipType;
    // 手机版URL地址
    private String url;
    private String specialID;
    // 新闻文档ID
    private String docid;
    // 新闻标题
    private String title;
    // 新闻来源
    private String source;
    // 优先级
    private int priority;
    private String lmodify;
    private String boardid;
    // 副标题
    private String subtitle;
    // 图片链接
    private String imgsrc;
    // 发布时间
    private String ptime;
    // 是否banner新闻
    private int hasAD;
    // 新闻是否为图片新闻
    private String photosetID;

    public String getPhotosetID() {
        return photosetID;
    }

    public void setPhotosetID(String photosetID) {
        this.photosetID = photosetID;
    }

    // 额外图片
    private List<ImgextraBean> imgextra;

    public String getPostid() {
        return postid;
    }

    public void setPostid(String postid) {
        this.postid = postid;
    }

    public String getUrl_3w() {
        return url_3w;
    }

    public void setUrl_3w(String url_3w) {
        this.url_3w = url_3w;
    }

    public int getVotecount() {
        return votecount;
    }

    public void setVotecount(int votecount) {
        this.votecount = votecount;
    }

    public int getReplyCount() {
        return replyCount;
    }

    public void setReplyCount(int replyCount) {
        this.replyCount = replyCount;
    }

    public String getSkipID() {
        return skipID;
    }

    public void setSkipID(String skipID) {
        this.skipID = skipID;
    }

    public String getLtitle() {
        return ltitle;
    }

    public void setLtitle(String ltitle) {
        this.ltitle = ltitle;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public String getSkipType() {
        return skipType;
    }

    public void setSkipType(String skipType) {
        this.skipType = skipType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getSpecialID() {
        return specialID;
    }

    public void setSpecialID(String specialID) {
        this.specialID = specialID;
    }

    public String getDocid() {
        return docid;
    }

    public void setDocid(String docid) {
        this.docid = docid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public String getLmodify() {
        return lmodify;
    }

    public void setLmodify(String lmodify) {
        this.lmodify = lmodify;
    }

    public String getBoardid() {
        return boardid;
    }

    public void setBoardid(String boardid) {
        this.boardid = boardid;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getImgsrc() {
        return imgsrc;
    }

    public void setImgsrc(String imgsrc) {
        this.imgsrc = imgsrc;
    }

    public String getPtime() {
        return ptime;
    }

    public void setPtime(String ptime) {
        this.ptime = ptime;
    }

    public int getHasAD() {
        return hasAD;
    }

    public void setHasAD(int hasAD) {
        this.hasAD = hasAD;
    }

    public List<ImgextraBean> getImgextra() {
        return imgextra;
    }

    public void setImgextra(List<ImgextraBean> imgextra) {
        this.imgextra = imgextra;
    }

    public static class ImgextraBean {
        /**
         * imgsrc : http://cms-bucket.nosdn.127.net/416fb909a7be4ef0994a049dc72d798820161226090753.png
         */

        private String imgsrc;

        public String getImgsrc() {
            return imgsrc;
        }

        public void setImgsrc(String imgsrc) {
            this.imgsrc = imgsrc;
        }

        @Override
        public String toString() {
            return "ImgextraBean{" +
                    "imgsrc='" + imgsrc + '\'' +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "NewsListNormalBean{" +
                "postid='" + postid + '\'' +
                ", url_3w='" + url_3w + '\'' +
                ", votecount=" + votecount +
                ", replyCount=" + replyCount +
                ", skipID='" + skipID + '\'' +
                ", ltitle='" + ltitle + '\'' +
                ", digest='" + digest + '\'' +
                ", skipType='" + skipType + '\'' +
                ", url='" + url + '\'' +
                ", specialID='" + specialID + '\'' +
                ", docid='" + docid + '\'' +
                ", title='" + title + '\'' +
                ", source='" + source + '\'' +
                ", priority=" + priority +
                ", lmodify='" + lmodify + '\'' +
                ", boardid='" + boardid + '\'' +
                ", subtitle='" + subtitle + '\'' +
                ", imgsrc='" + imgsrc + '\'' +
                ", ptime='" + ptime + '\'' +
                ", hasAD=" + hasAD +
                ", imgextra=" + imgextra +
                '}';
    }
} public class PicListBean {

    /**
     * desc : Hendo除了COS男版蜘蛛侠外更是挑战了一下原作中由蜘蛛侠女友温格所变身的女版蜘蛛，效果更是到位。女版蜘蛛侠会不会更厉害，更值得期待？
     * pvnum :
     * createdate : 2016-12-27 01:49:02
     * scover : http://img3.cache.netease.com/photo/0031/2016-12-27/s_C98O8VGL6LRK0031.jpg
     * setname : 女版蜘蛛侠会不会更厉害？值得期待！
     * cover : http://img4.cache.netease.com/photo/0031/2016-12-27/C98O8VGL6LRK0031.jpg
     * pics : ["http://img3.cache.netease.com/photo/0031/2016-12-27/C98O8UBL6LRK0031.jpg","http://img3.cache.netease.com/photo/0031/2016-12-27/C98O8UPE6LRK0031.jpg","http://img4.cache.netease.com/photo/0031/2016-12-27/C98O8UVI6LRK0031.jpg"]
     * clientcover1 :
     * replynum : 217
     * topicname :
     * setid : 91416
     * seturl : http://play.163.com/photoview/6LRK0031/91416.html
     * datetime : 2016-12-27 01:57:49
     * clientcover :
     * imgsum : 16
     * tcover : http://img4.cache.netease.com/photo/0031/2016-12-27/t_C98O8VGL6LRK0031.jpg
     */

//    private List<PicList> mPicLists;
//
//    public List<PicList> getPicLists() {
//        return mPicLists;
//    }
//
//    public void setPicLists(List<PicList> picLists) {
//        mPicLists = picLists;
//    }
//
//    public class PicList{
        private String desc;
        // 创建时间
        private String createdate;
        private String setname;
        private String cover;
        private String setid;
        private String seturl;
        // 发布时间
        private String datetime;
        // 图片总数
        private String imgsum;
        private List<String> pics;

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getCreatedate() {
            return createdate;
        }

        public void setCreatedate(String createdate) {
            this.createdate = createdate;
        }

        public String getSetname() {
            return setname;
        }

        public void setSetname(String setname) {
            this.setname = setname;
        }

        public String getCover() {
            return cover;
        }

        public void setCover(String cover) {
            this.cover = cover;
        }

        public String getSetid() {
            return setid;
        }

        public void setSetid(String setid) {
            this.setid = setid;
        }

        public String getSeturl() {
            return seturl;
        }

        public void setSeturl(String seturl) {
            this.seturl = seturl;
        }

        public String getDatetime() {
            return datetime;
        }

        public void setDatetime(String datetime) {
            this.datetime = datetime;
        }

        public String getImgsum() {
            return imgsum;
        }

        public void setImgsum(String imgsum) {
            this.imgsum = imgsum;
        }

        public List<String> getPics() {
            return pics;
        }

        public void setPics(List<String> pics) {
            this.pics = pics;
        }

    @Override
    public String toString() {
        return "PicListBean{" +
                "setname='" + setname + '\'' +
                ", cover='" + cover + '\'' +
                ", createdate='" + createdate + '\'' +
                '}';
    }


    //    }




} public class VideoBean implements Parcelable {

    /**
     * cover : http://vimg2.ws.126.net/image/snapshot/2016/12/L/K/VC8FOVBLK.jpg
     * description :
     * length : 206
     * m3u8_url : http://flv2.bn.netease.com/tvmrepo/2016/12/6/A/EC8F5GU6A/SD/movie_index.m3u8
     * mp4_url : http://flv2.bn.netease.com/tvmrepo/2016/12/6/A/EC8F5GU6A/SD/EC8F5GU6A-mobile.mp4
     * playCount : 103
     * playersize : 1
     * ptime : 2016-12-28 22:46:41.0
     * replyBoard : video_bbs
     * replyCount : 0
     * replyid : C8F5KVH9008535RB
     * sectiontitle : http://vimg3.ws.126.net/image/snapshot/2016/12/L/S/VC7T21ILS.jpg
     * title : 吃货福利！手把手教你做酸菜鱼 超极好吃
     * topicDesc : 关于知识,关于世界
     * topicImg : http://vimg3.ws.126.net/image/snapshot/2016/12/L/S/VC7T21ILS.jpg
     * topicName : 大开眼界
     * topicSid : VC7T21ILQ
     * vid : VC8F5KVH9
     * videoTopic : {"alias":"关于知识,关于世界","ename":"T1482313997359","tid":"T1482313997359","tname":"大开眼界"}
     * videosource : 新媒体
     */

    private String cover;
    private int length;
    private String m3u8_url;
    private String m3u8Hd_url;
    private String mp4_url;
    private String mp4Hd_url;
    private int playCount;
    private String ptime;
    private String replyid;
    private String title;
    private String topicDesc;
    private String topicName;
    private String topicSid;
    private String vid;
    //    private VideoTopicBean videoTopic;
    private String videosource;

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public String getM3u8_url() {
        return m3u8_url;
    }

    public String getM3u8Hd_url() {
        return m3u8Hd_url;
    }

    public void setM3u8Hd_url(String m3u8Hd_url) {
        this.m3u8Hd_url = m3u8Hd_url;
    }

    public String getMp4Hd_url() {
        return mp4Hd_url;
    }

    public void setMp4Hd_url(String mp4Hd_url) {
        this.mp4Hd_url = mp4Hd_url;
    }

    public void setM3u8_url(String m3u8_url) {
        this.m3u8_url = m3u8_url;
    }

    public String getMp4_url() {
        return mp4_url;
    }

    public void setMp4_url(String mp4_url) {
        this.mp4_url = mp4_url;
    }

    public int getPlayCount() {
        return playCount;
    }

    public void setPlayCount(int playCount) {
        this.playCount = playCount;
    }

    public String getPtime() {
        return ptime;
    }

    public void setPtime(String ptime) {
        this.ptime = ptime;
    }

    public String getReplyid() {
        return replyid;
    }

    public void setReplyid(String replyid) {
        this.replyid = replyid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTopicDesc() {
        return topicDesc;
    }

    public void setTopicDesc(String topicDesc) {
        this.topicDesc = topicDesc;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public String getTopicSid() {
        return topicSid;
    }

    public void setTopicSid(String topicSid) {
        this.topicSid = topicSid;
    }

    public String getVid() {
        return vid;
    }

    public void setVid(String vid) {
        this.vid = vid;
    }

//    public VideoTopicBean getVideoTopic() {
//        return videoTopic;
//    }
//
//    public void setVideoTopic(VideoTopicBean videoTopic) {
//        this.videoTopic = videoTopic;
//    }

    public String getVideosource() {
        return videosource;
    }

    public void setVideosource(String videosource) {
        this.videosource = videosource;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(cover);
        dest.writeInt(length);
        dest.writeString(m3u8_url);
        dest.writeString(m3u8Hd_url);
        dest.writeString(mp4_url);
        dest.writeString(mp4Hd_url);
        dest.writeInt(playCount);
        dest.writeString(ptime);
        dest.writeString(replyid);
        dest.writeString(title);
        dest.writeString(topicDesc);
        dest.writeString(topicName);
        dest.writeString(topicSid);
        dest.writeString(vid);
        dest.writeString(videosource);
    }

    public static final Parcelable.Creator<VideoBean> CREATOR = new Parcelable.Creator<VideoBean>() {

        @Override
        public VideoBean createFromParcel(Parcel source) {
            VideoBean videoBean = new VideoBean();
            videoBean.cover = source.readString();
            videoBean.length = source.readInt();
            videoBean.m3u8_url = source.readString();
            videoBean.m3u8Hd_url = source.readString();
            videoBean.mp4_url = source.readString();
            videoBean.mp4Hd_url = source.readString();
            videoBean.playCount = source.readInt();
            videoBean.replyid = source.readString();
            videoBean.title = source.readString();
            videoBean.topicDesc = source.readString();
            videoBean.topicName = source.readString();
            videoBean.vid = source.readString();
            videoBean.videosource = source.readString();

            return videoBean;
        }

        @Override
        public VideoBean[] newArray(int size) {
            return new VideoBean[size];
        }
    };

//    public static class VideoTopicBean {
//        /**
//         * alias : 关于知识,关于世界
//         * ename : T1482313997359
//         * tid : T1482313997359
//         * tname : 大开眼界
//         */
//
//        private String alias;
//        private String ename;
//        private String tid;
//        private String tname;
//
//        public String getAlias() {
//            return alias;
//        }
//
//        public void setAlias(String alias) {
//            this.alias = alias;
//        }
//
//        public String getEname() {
//            return ename;
//        }
//
//        public void setEname(String ename) {
//            this.ename = ename;
//        }
//
//        public String getTid() {
//            return tid;
//        }
//
//        public void setTid(String tid) {
//            this.tid = tid;
//        }
//
//        public String getTname() {
//            return tname;
//        }
//
//        public void setTname(String tname) {
//            this.tname = tname;
//        }
//    }

    @Override
    public String toString() {
        return "VideoBean{" +
                "cover='" + cover + '\'' +
                ", length=" + length +
                ", m3u8_url='" + m3u8_url + '\'' +
                ", m3u8Hd_url='" + m3u8Hd_url + '\'' +
                ", mp4_url='" + mp4_url + '\'' +
                ", mp4Hd_url='" + mp4Hd_url + '\'' +
                ", playCount=" + playCount +
                ", ptime='" + ptime + '\'' +
                ", replyid='" + replyid + '\'' +
                ", title='" + title + '\'' +
                ", topicDesc='" + topicDesc + '\'' +
                ", topicName='" + topicName + '\'' +
                ", topicSid='" + topicSid + '\'' +
                ", vid='" + vid + '\'' +
                ", videosource='" + videosource + '\'' +
                '}';
    }
} public class Api {



    public static final String host = "http://c.m.163.com/";

    // 普通栏目前缀, 示例： http://c.m.163.com/nc/article/list/T1467284926140/0-20.html
    public static final String CommonUrl = host + "nc/article/list/";

    // 图片栏目的前缀， 示例： http://pic.news.163.com/photocenter/api/list/0031/6LRK0031,6LRI0031/0/20.json
    // 推荐图片：0031， 新闻图片： 0001 ， 明星图片：0003
    public static final String PictureUrl = "http://pic.news.163.com/photocenter/api/list/";

    // 特殊频道前缀：热点、网易号适用
    public static final String SpecialColumn1 = "recommend/getSubDocPic?";

    // 特殊频道前缀:	视频/段子、美女、萌宠适用
    public static final String SpecialColumn2 = "recommend/getChanListNews?channel=";
    // 文章详情前缀
    public static final String DetailUrl = host + "nc/article/";

    // 普通新闻栏目的结尾，注意要在前面添加新闻从那一条开始获取
    // 如 ：http://c.m.163.com/nc/article/list/T1467284926140/0-20.html，获取最新的20条新闻
    // http://c.m.163.com/nc/article/list/T1467284926140/20-20.html，获取从第20条开始的后面20条新闻
    public static final String endUrl = "-20.html";

    // 所有特殊频道的结尾，如：热点、网易号、段子、美女、萌宠
    public static final String SpecialendUrl = "&size=10&offset=";

    /**
     * 新闻文章详情页链接尾部
     * 示例：http://c.m.163.com/nc/article/C8T2G5QL0511A99L/full.html
     * 其中postId ：C8T2G5QL0511A99L
     */
    public static final String endDetailUrl = "/full.html";

    /**
     * 图片新闻详情页连接
     * 链接示例： http://c.m.163.com/photo/api/set/0031/13897.json
     * 图片详情页：0031为图片频道（列表连接后面的0031），13897为图片新闻setid
     */
    public static final String PictureDetailUrl = host + "photo/api/set/";
    // 图片新闻详情页结尾
    public static final String endPictureDetailUrl = ".json";


    /**
     * 视频详情链接
     *  示例： http://c.m.163.com/nc/video/detail/VC5BA022H.html
     *  其中VC5BA022H是视频的vid
     */
    public static final String videoDetailUrl = host + "nc/video/detail/";
    // 视频详情链接尾部
    public static final String EndUrlVideoDetailUrl = ".html";


    // 独家
    public static final String zhenhuaId = "T1370583240249";

    // NBA
    public static final String NBAId = "T1348649145984";

    // 头条
    public static final String toutiaoId = "T1348647909107";

    // 社会
    public static final String shehuiId = "T1348648037603";

    // 历史
    public static final String lishiId = "T1368497029546";

    // 军事
    public static final String junshiId = "T1348648141035";

    // 哒哒趣闻
    public static final String dadaId = "T1444289532601";

    // 航空
    public static final String aviationId = "T1474271789612";

    // 要闻
    public static final String yaowenspecialId = "T1467284926140";

    // 娱乐
    public static final String yuleId = "T1348648517839";

    // 影视歌
    public static final String dianyingId = "T1348648650048";

    // 财经
    public static final String caijingId = "T1348648756099";

    // 股票
    public static final String stockId = "T1473054348939";

    // 彩票
    public static final String caipiaoId = "T1356600029035";

    // 体育
    public static final String tiyuId = "T1348649079062";

    // 中国足球
    public static final String zhongchaoId = "T1348649503389";

    // 国际足球
    public static final String zuqiuId = "T1348649176279";

    // CBA
    public static final String CBAId = "T1348649475931";

    // 跑步
    public static final String paobuId = "T1411113472760";

    // 科技
    public static final String kejiId = "T1348649580692";

    // 手机
    public static final String shoujiId = "T1348649654285";

    // 数码
    public static final String shumaId = "T1348649776727";

    // 智能
    public static final String zhinengId = "T1351233117091";

    // 轻松一刻
    public static final String qingsongyikeId = "T1350383429665";

    // 云课堂
    public static final String gongkaikeId = "T1421997195219";

    // 态度公开课
    public static final String attitudeopenId = "T1456394562871";

    // 汽车
    public static final String qicheId = "T1348654060988";

    // 房产
    public static final String fangchanId = "T1348654085632";

    // 家居
    public static final String jiajuId = "T1348654105308";

    // 游戏
    public static final String youxiId = "T1348654151579";

    // 旅游
    public static final String lvyouId = "T1348654204705";

    // 健康
    public static final String jiankangId = "T1414389941036";

    // 读书
    public static final String dushuId = "T1401272877187";

    // 酒香
    public static final String jiuxiangId = "T1385429690972";

    // 教育
    public static final String jiaoyuId = "T1348654225495";

    // 亲子
    public static final String qinziId = "T1397116135282";

    // 暴雪游戏
    public static final String baoxueId = "T1397016069906";

    // 漫画
    public static final String manhuaId = "T1444270454635";

    // 二次元
    public static final String erciyuanlanmuId = "T1481105123675";

    // 态度营销
    public static final String taiduyingxiaoId = "T1464592736048";

    // 时尚
    public static final String nvrenId = "T1348650593803";

    // 情感
    public static final String qingganId = "T1348650839000";

    // 政务
    public static final String zhengwuId = "T1414142214384";

    // 艺术
    public static final String ArtId = "T1441074311424";

    // 阳光法院
    public static final String yangguangfayuanId = "T1482470888760";

    // 跟贴
    public static final String specialCommentId = "T1419315959525";

    // 海外
    public static final String zongheId = "T1462426218632";


    // 本地   暂不使用
    public static final String specialLocalId = "T1419316531256";

    // 博客
    public static final String specialBlogId = "T1419386532423";

    // 论坛
    public static final String specialBBSId = "T1419386592923";


    // 直播
    public static final String specialLiveId = "T1433137697241";


    // 图片新闻尾部，需要在签名添加参数，可获得从某条新闻之后的20条新闻
    // 示例 ： http://pic.news.163.com/photocenter/api/list/0001/00AN0001,00AO0001/0/20.json
    public static final String endPicture = "/20.json";
    // 图片
    public static final String specialPictureId = "T1419316384474";

    // 推荐图片：0031/6LRK0031,6LRI0031/    应使用瀑布流
    public static final String RecommendPictureId = "0031";
    public static final String RecommendPicture = "/6LRK0031,6LRI0031/";

    // 新闻图片：0001/00AP0001,3R710001,4T8E0001/    横向排版
    public static final String NewsPictureId = "0001";
    public static final String NewsPicture = "/00AP0001,3R710001,4T8E0001/";
    // 热点图片：0001/00AN0001,00AO0001/     横向排版
    public static final String HotPicture = "/00AN0001,00AO0001/";

    // 明星图片：0003/00AJ0003,0AJQ0003,3LF60003,00B70003,00B50003/      瀑布流排版
    public static final String StarPictureId = "0003";
    public static final String StarPicture = "/00AJ0003,0AJQ0003,3LF60003,00B70003,00B50003/";



    /**
     *   特殊格式新闻：
     *   下面几类连接基本一致：
     *   热点、网易号类的新闻连接形式差不多，但是网易号多了from参数
     *   使用getSubDocPic
     *
     *   段子、美女、萌宠连接基本一致
     *   使用	getChanListNews
     **/
    // 热点
    public static final String specialRedianId = "T1427878984398";
    // 热点url
    public static final String RedianUrl = host + SpecialColumn1 + SpecialendUrl;

    // 网易号
    public static final String specialSubId = "T1449126525962";
    // 网易号url
    public static final String WangYiHaoUrl = host + SpecialColumn1 + "from=netease_h" +SpecialendUrl;

    // 下列为特殊频道URL， 统一连接形式为：
    // http://c.m.163.com/recommend/getChanListNews?channel=T1419316284722&size=10&offset=
    public static final String specialURL = host + SpecialColumn2;

    // 视频
    // http://c.m.163.com/recommend/getChanListNews?channel=T1457068979049&offset=0&size=20&devId=44t6%2B5mG3ACAOlQOCLuIHg%3D%3D
    public static final String specialVideoId = "T1457068979049";
    // 手机开发id号，任意手机的开发Id号都可以
    public static final String devId = "&devId=44t6%2B5mG3ACAOlQOCLuIHg%3D%3D";

    // 段子
    public static final String specialJokeId = "T1419316284722";

    // 美女
    public static final String specialGirlId = "T1456112189138";

    // 萌宠
    public static final String specialAnimalId = "T1456112438822";

    // 热点视频 http://c.m.163.com/nc/video/list/V9LG4B3A0/n/10-10.html
    public static final String Video = host + "nc/video/list/";
    public static final String VideoCenter = "/n/";
    public static final String videoEndUrl = "-20.html";
    // 热点视频
    public static final String VideoReDianId = "V9LG4B3A0";
    // 推荐视频
    // http://c.m.163.com/recommend/getChanListNews?channel=T1457068979049&offset=0&size=20&devId=44t6%2B5mG3ACAOlQOCLuIHg%3D%3D
    public static final String VideorecommendId = "T1457068979049";
    // 搞笑视屏 http://c.m.163.com/nc/video/list/VAP4BFE3U/y/10-10.html
    // 美女视频 http://c.m.163.com/nc/video/list/VAP4BG6DL/y/0-10.html
    // 新闻现场 http://c.m.163.com/nc/video/list/VAV3H6JSN/y/0-10.html
    // 萌物 http://c.m.163.com/nc/video/list/VAP4BFR16/y/0-10.html
    // 黑科技  http://c.m.163.com/nc/video/list/VBF8F2PKF/y/0-10.html
    // 二次元 http://c.m.163.com/nc/video/list/VBF8F1PSA/y/0-10.html
    // 涨姿势  http://c.m.163.com/nc/video/list/VBF8F3SGL/y/0-10.html
    //直播视
    public static final String VideoLive = "http://data.live.126.net/livechannel/previewlist.json";



} public class DataParse {

    // 新闻列表解析
    public static ArrayList<NewsListNormalBean> NewsList(String json, String id) {
        // Gson, JsonObject
        // 使用JsonObject解析方式: 如果遇到{},就是JsonObject;如果遇到[], 就是JsonArray
        if (json != null) {
            JSONObject jsonObject = null;
            ArrayList<NewsListNormalBean> newsListNormalBeans = new ArrayList<>();
            try {
                jsonObject = new JSONObject(json);
                JSONArray array = jsonObject.getJSONArray(id);
                Gson gson = new Gson();
                for (int i = 0; i < array.length(); i++) {
                    String js = array.get(i).toString();
                    NewsListNormalBean newsListNormalBean = gson.fromJson(js, NewsListNormalBean.class);
                    newsListNormalBeans.add(newsListNormalBean);
                }
                return newsListNormalBeans;
            } catch (JSONException e) {
                e.printStackTrace();
                LogUtils.d(TAG, "parseJson: 数据解析错误");
            }
        } else {
            LogUtils.d(TAG, "parseData: 没有数据");
        }
        return null;
    }


    /**
     *  新闻详情页解析
     * @param result
     * @param tid
     * @return
     */
    public static NewsDetailBean NewsDetail(String result, String tid) {
        if (result != null) {
            JSONObject jsonObject = null;
            NewsDetailBean newsDetailBean;
            try {
                jsonObject = new JSONObject(result);
                String detail = jsonObject.getJSONObject(tid).toString();
                Gson gson = new Gson();
                newsDetailBean = gson.fromJson(detail, NewsDetailBean.class);
                return newsDetailBean;
            } catch (JSONException e) {
                e.printStackTrace();
                LogUtils.d(TAG, "parseJson: 数据解析错误");
            }
        } else {
            LogUtils.d(TAG, "parseData: 没有数据");
        }
        return null;
    }

    /**
     * 图片列表解析
     * @param result
     * @return
     */
    public static ArrayList<PicListBean> PicList(String result) {
        LogUtils.d("图片返回的数据", "parseData: " + result);
        ArrayList<PicListBean> PicListBeans = new ArrayList<>();
        Gson gson = new Gson();
        try {
            JSONArray jsonArray = new JSONArray(result);
            for (int i = 0; i < jsonArray.length(); i++) {
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                PicListBean picListbean = gson.fromJson(jsonObject.toString(), PicListBean.class);
                PicListBeans.add(picListbean);
            }
            return PicListBeans;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
     * 图片新闻详情页解析
     * @param result
     * @return
     */
    public static ImageDetailBean ImageDetail(String result) {
        ImageDetailBean imageDetailBean = null;
        if (result != null) {
            Gson gson = new Gson();
            imageDetailBean = gson.fromJson(result, ImageDetailBean.class);
            LogUtils.d(TAG, "parseJson: 数据解析成功");
        } else {
            LogUtils.d(TAG, "parseData: 没有数据");
        }
        return imageDetailBean;
    }

    /**
     * 视频列表解析
     * @param result
     * @return
     */
    public static ArrayList<VideoBean> VideoList(String result) {
        if (result != null) {
            JSONObject jsonObject = null;
            ArrayList<VideoBean> videoBeen = new ArrayList<>();
            try {
                jsonObject = new JSONObject(result);
                JSONArray array = jsonObject.getJSONArray("视频");
                Gson gson = new Gson();
                for (int i = 0; i < array.length(); i++) {
                    String js = array.get(i).toString();
                    VideoBean vieoBean = gson.fromJson(js, VideoBean.class);
                    videoBeen.add(vieoBean);
                }
                return videoBeen;
            } catch (JSONException e) {
                e.printStackTrace();
                LogUtils.d(TAG, "parseJson: 数据解析错误");
            }
        } else {
            LogUtils.d(TAG, "parseData: 没有数据");
        }
        return null;
    }

    /**
     * 视频详情页解析
     * @param result
     * @return
     */
    public static VideoBean VideoDetail(String result) {
        VideoBean bean = null;
        if (result != null) {
            Gson gson = new Gson();
            bean = gson.fromJson(result, VideoBean.class);
            LogUtils.d(TAG, "parseData: " + bean);
        }
        return bean;
    }
} public interface HttpCallbackListener {
    void onSuccess(String result);
    void onError(Exception e);
} @SuppressWarnings("deprecated")
public class HttpHelper {

    private static final String TAG = HttpHelper.class.getSimpleName();

    /**
     * get请求，获取返回字符串内容
     */
    public static void get(String url, HttpCallbackListener httpCallbackListener) {
        HttpGet httpGet = new HttpGet(url);
        execute(url, httpGet, httpCallbackListener);
    }

    /**
     * post请求，获取返回字符串内容
     */
    public static void post(String url, byte[] bytes, HttpCallbackListener httpCallbackListener) {
        HttpPost httpPost = new HttpPost(url);
        ByteArrayEntity byteArrayEntity = new ByteArrayEntity(bytes);
        httpPost.setEntity(byteArrayEntity);
        execute(url, httpPost, httpCallbackListener);
    }

    /**
     * 下载
     */
    public static void download(String url, HttpCallbackListener httpCallbackListener) {
        HttpGet httpGet = new HttpGet(url);
        execute(url, httpGet, httpCallbackListener);
    }

    /**
     * 执行网络访问
     */
    private static void execute(String url, HttpRequestBase requestBase, HttpCallbackListener httpCallbackListener) {
        boolean isHttps = url.startsWith("https://");//判断是否需要采用https
        AbstractHttpClient httpClient = HttpClientFactory.create(isHttps);
        HttpContext httpContext = new SyncBasicHttpContext(new BasicHttpContext());
        HttpRequestRetryHandler retryHandler = httpClient.getHttpRequestRetryHandler();//获取重试机制
        int retryCount = 0;
        boolean retry = true;
        while (retry) {
            try {
                HttpResponse response = httpClient.execute(requestBase, httpContext);//访问网络
                int stateCode  = response.getStatusLine().getStatusCode();
//                LogUtils.e(TAG, "http状态码：" + stateCode);
                if (response != null) {
                    if (stateCode == HttpURLConnection.HTTP_OK){
                        HttpResult httpResult = new HttpResult(response, httpClient, requestBase);
                        String result = httpResult.getString();
                        if (!TextUtils.isEmpty(result)){
                            httpCallbackListener.onSuccess(result);
                            return;
                        } else {
                            throw new RuntimeException("数据为空");
                        }
                    } else {
                        throw new RuntimeException(HttpRequestCode.ReturnCode(stateCode));
                    }
                }
            } catch (Exception e) {
                IOException ioException = new IOException(e.getMessage());
                retry = retryHandler.retryRequest(ioException, ++retryCount, httpContext);//把错误异常交给重试机制，以判断是否需要采取从事
                LogUtils.e(TAG, "重复次数：" + retryCount + "   :"+ e);
                if (!retry){
                    httpCallbackListener.onError(e);
                }
            }
        }
    }

    /**
     * http的返回结果的封装，可以直接从中获取返回的字符串或者流
     */
    public static class HttpResult {
        private HttpResponse mResponse;
        private InputStream mIn;
        private String mStr;
        private HttpClient mHttpClient;
        private HttpRequestBase mRequestBase;

        public HttpResult(HttpResponse response, HttpClient httpClient, HttpRequestBase requestBase) {
            mResponse = response;
            mHttpClient = httpClient;
            mRequestBase = requestBase;
        }

        public int getCode() {
            StatusLine status = mResponse.getStatusLine();
            return status.getStatusCode();
        }


        /**
         * 从结果中获取字符串，一旦获取，会自动关流，并且把字符串保存，方便下次获取
         */
        public String getString() {
            if (!StringUtils.isEmpty(mStr)) {
                return mStr;
            }
            InputStream inputStream = getInputStream();
            ByteArrayOutputStream out = null;
            if (inputStream != null) {
                try {
                    out = new ByteArrayOutputStream();
                    byte[] buffer = new byte[1024 * 4];
                    int len = -1;
                    while ((len = inputStream.read(buffer)) != -1) {
                        out.write(buffer, 0, len);
                    }
                    byte[] data = out.toByteArray();
                    mStr = new String(data, "utf-8");
                } catch (Exception e) {
                    LogUtils.e(TAG, e);
                } finally {
                    IOUtils.close(out);
                    close();
                }
            }
            return mStr;
        }

        /**
         * 获取流，需要使用完毕后调用close方法关闭网络连接
         */
        public InputStream getInputStream() {
            if (mIn == null && getCode() < 300) {
                HttpEntity entity = mResponse.getEntity();
                try {
                    mIn = entity.getContent();
                } catch (Exception e) {
                    LogUtils.e(TAG, e);
                }
            }
            return mIn;
        }

        /**
         * 关闭网络连接
         */
        public void close() {
            if (mRequestBase != null) {
                mRequestBase.abort();
            }
            IOUtils.close(mIn);
            if (mHttpClient != null) {
                mHttpClient.getConnectionManager().closeExpiredConnections();
            }
        }
    }
}
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import com.example.channelmanager.ProjectChannelBean;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.ArrayList;
import java.util.List;
import cn.bproject.neteasynews.Utils.IOUtils;
import cn.bproject.neteasynews.bean.ImageDetailBean;
import cn.bproject.neteasynews.bean.NewsDetailBean;
import cn.bproject.neteasynews.bean.NewsListNormalBean;
import cn.bproject.neteasynews.bean.PicListBean;
import cn.bproject.neteasynews.bean.VideoBean;
import cn.bproject.neteasynews.common.Api;
import cn.bproject.neteasynews.http.DataParse;
import cn.bproject.neteasynews.http.HttpCallbackListener;
import cn.bproject.neteasynews.http.HttpHelper;
import static org.junit.Assert.assertEquals;
package cn.bproject.neteasynews;







/**
 * Instrumentation test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    public static final String TAG = "ExampleInstrumentedTest";

    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("cn.bproject.neteasynews", appContext.getPackageName());
    }

    @Test
    public void getNewsListDataFromServer() {
        String url = Api.CommonUrl + Api.yaowenspecialId + "/" + 0 + Api.endUrl;
//        String url = "http://news.sina.com.cn/o/2017-02-11/doc-ifyamkqa5606.shtml";
        // 测试新闻详情
        HttpHelper.get(url, new HttpCallbackListener() {
            @Override
            public void onSuccess(String result) {
                ArrayList<NewsListNormalBean> content = DataParse.NewsList(result, Api.yaowenspecialId);
                for (NewsListNormalBean bean : content) {
                    Log.d("ExampleInstrumentedTest", "getDataFromServer: title :  " + result);
                }
            }

            @Override
            public void onError(Exception e) {
                Log.e(TAG, "onError: " + e );
            }
        });

    }

    @Test
    public void getNewsDetailDataFromServer() {
        String url = "http://c.m.163.com/nc/article/C8T2G5QL0511A99L/full.html";
        // 测试新闻详情
        HttpHelper.get(url, new HttpCallbackListener() {
            @Override
            public void onSuccess(String result) {
                NewsDetailBean content = DataParse.NewsDetail(result, "C8T2G5QL0511A99L");
                Log.d("ExampleInstrumentedTest", "getDataFromServer: title :  " + content);
            }

            @Override
            public void onError(Exception e) {
                Log.e(TAG, "onError: "  + e );
            }
        });

    }

    @Test
    public void getVideoDataFromServer1() {
        String url = Api.host + Api.SpecialColumn2 + "T1457068979049" + Api.SpecialendUrl + 21 + Api.devId;
        // 测试视频列表
        HttpHelper.get(url, new HttpCallbackListener() {
            @Override
            public void onSuccess(String result) {
                ArrayList<VideoBean> vidwoBeens = DataParse.VideoList(result);
                for (VideoBean bean : vidwoBeens) {
                    Log.d("ExampleInstrumentedTest", "getDataFromServer: title :  " + bean.getTitle());
                }
            }

            @Override
            public void onError( Exception e) {
                Log.e(TAG, "onError: "  + e );
            }
        });

    }


    @Test
    public void getVideoDetailDataFromServer() {
        String url = "http://c.m.163.com/nc/video/detail/VC8TVUN5N.html";
        // 测试视频列表
        HttpHelper.get(url, new HttpCallbackListener() {
            @Override
            public void onSuccess(String result) {
                VideoBean vidwoBeen = DataParse.VideoDetail(result);
//
                Log.d("ExampleInstrumentedTest", "getDataFromServer: title :  " + vidwoBeen.getTitle());
            }

            @Override
            public void onError(Exception e) {
                Log.e(TAG, "onError: "  + e );
            }
        });


    }

    @Test
    public void getPicListDataFromServer() {
        String url = "http://pic.news.163.com/photocenter/api/list/0001/00AN0001,00AO0001/0/20.json";
        HttpHelper.get(url, new HttpCallbackListener() {
            @Override
            public void onSuccess(String result) {
                ArrayList<PicListBean> arrayList = DataParse.PicList(result);
                for (PicListBean bean : arrayList) {
                    Log.d("ExampleInstrumentedTest", "getDataFromServer: title :  " + bean.getSetname());
                }
            }

            @Override
            public void onError(Exception e) {
                Log.e(TAG, "onError: " + e );
            }
        });

    }

    @Test
    public void getPicDetailDataFromServer() {
        String url = "http://c.m.163.com/photo/api/set/0031/13897.json";
        HttpHelper.get(url, new HttpCallbackListener() {
            @Override
            public void onSuccess(String result) {
                ImageDetailBean imageDetailBean = DataParse.ImageDetail(result);
                Log.d(TAG, "getPicDetailDataFromServer: " + imageDetailBean.getCover());
            }

            @Override
            public void onError(Exception e) {
                Log.e(TAG, "onError: " +  e );
            }
        });
    }

    @Test
    public void getMoreChannelFromAsset(){
        String moreChannel = IOUtils.readFromFile("projectChannel.txt");