摘要:
主Activitypublic class MainActivity extends Activity { ListView listView; File cache; Handler handler = new Handler(){ public void handleMessage(Message msg) { //异步加载完后的图片数据集合 listView.setAdapter(new ContactAdapter(MainActivity.this, (List<Cont... 阅读全文
摘要:
JSON数据格式[{id:56,title:"xxxxx",timelength:90},{id:16,title:"xbbx",timelength:20}] 1 /** 2 * 获取最新的视频资讯 3 * @return 4 * @throws Exception 5 */ 6 public static List<News> getJSONLastNews() throws Exception{ 7 8 String path = "http://192.168.0.168:8080/web/ListServlet... 阅读全文
摘要:
Activity 生命周期显式 Intent 调用 1 //创建一个显式的 Intent 对象(方法一:在构造函数中指定) 2 Intent intent = new Intent(Intent_Demo1.this, Intent_Demo1_Result1.class); 3 4 Bundle bundle = new Bundle(); 5 bundle.putString("id", strID); 6 ... 阅读全文
摘要:
Xml对象: 1 /** 2 * 获取数据 3 * @param xml 4 * @return 5 * @throws Exception 6 */ 7 public static List<Person> getPersons(InputStream xml) throws Exception 8 { 9 List<Person> persons = null;10 Person person = null;11 12 XmlPullParser pullParser = Xm... 阅读全文
摘要:
网络通信层次图TCP报文段格式建链过程中的“三次握手”1、SYN(Synchronize Sequence Numbers)是TCP是传输控制协议中的一个标志位。如果该位被置为1,则表示这个报文是一个请求建立连接的报文。 2、ACK(ACKnowledge Character)中文:确认字符。也是TCP是传输控制协议的一个标志位。在数据通信传输中,接收站发给发送站的一种传输控制字符。它表示确认发来的数据已经接受无误。是一个用于确认的报文。关闭链路的四次握手1、FIN(finish) 结束,没有更多的数据发送Http请求协议GET /img/iknow/msg/msg.gif HTTP/1.1A 阅读全文