摘要: KeyPoint: 1.HttpClientConnection 默认是使用Get的方式的 Get方式的KeyCode Getclass DownloadTask extends AsyncTask<String, Integer, String>{ String resultData="lee"; @Override protected String doInBackground(String... params) { try { URL url=new URL("http://... 阅读全文
posted @ 2012-08-13 19:09 Epirus 阅读(1149) 评论(0) 推荐(0) 编辑
摘要: 为了获取更佳的用户体验我们使用Asynctaskkeypoint: doInBackground():只有一点,不要去操作UI,因为其他线程不能操作UI主线程,其他都OK onPostExecute():将回到主线程中,操作数据,所以下面给各列子 据说这种类,不适合多次的调用?有待实验?AsyncTaskpackage com.example.comunicationwithserver;import java.io.BufferedReader;import java.io.ByteArrayOutputStream;import java.io.IOException;impo... 阅读全文
posted @ 2012-08-13 15:39 Epirus 阅读(284) 评论(0) 推荐(0) 编辑
摘要: try{ Socket socket = ss.accept(); }finally { ss.close(); } }不论发布发生EXCEPTION 都会执行finally中的CODE 阅读全文
posted @ 2012-08-13 09:37 Epirus 阅读(127) 评论(0) 推荐(0) 编辑