摘要: private static ArrayList> parseJSONpinglun(InputStream inStream) throws Exception{byte[] data=ImageService.read(inStream);String string=new String(data);JSONArray jsonArray =new JSONArray(string);ArrayList> msgs=new ArrayList>();for(int i=0;i msg=new HashMap();JSONObject jsonobject= jsonArr 阅读全文
posted @ 2014-03-28 18:34 -琥珀川- 阅读(287) 评论(0) 推荐(0) 编辑
摘要: public static byte[] read(InputStream inStream) throws Exception{ByteArrayOutputStream outputStream=new ByteArrayOutputStream();//创建缓存将读到的信息放到缓存中byte[] buffer=new byte[1024];int length=0;while((length=inStream.read(buffer))!=-1){outputStream.write(buffer, 0, buffer.length);}inStream.close();return o 阅读全文
posted @ 2014-03-28 18:30 -琥珀川- 阅读(392) 评论(0) 推荐(0) 编辑
摘要: package com.example.service;import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;import org.json.JSONArray; import 阅读全文
posted @ 2014-03-28 18:08 -琥珀川- 阅读(437) 评论(0) 推荐(0) 编辑