Examples of StackOverflowEntity


Examples of com.so.happy.model.StackOverflowEntity

        //
        final GZIPInputStream gzipInputStream = new GZIPInputStream(response.getEntity().getStream());
        StringWriter stringWriter = new StringWriter();
        IOUtils.copy(gzipInputStream, stringWriter);
        Gson gson = new GsonBuilder().create();
        final StackOverflowEntity soEntity = gson.fromJson(stringWriter.toString(), StackOverflowEntity.class);
        System.err.println("--------------------------");
        System.err.println(soEntity);
        System.err.println("--------------------------");
        final StackOverflowQuestionEntity questionEntity = new StackOverflowQuestionEntity();
        questionEntity.setQuestionId(questionId);
        final SOItem soItem = soEntity.getItems()[0];
        questionEntity.setTitle(soItem.getTitle());
        questionEntity.setLink(soItem.getLink());
        questionEntity.setAnswered(soItem.isAnswered());
        questionEntity.setViewCount(soItem.getViewCount());
        questionEntity.setAnswerCount(soItem.getAnswerCount());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.