摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.IO.Packaging;using System.Xml;namespace... 阅读全文
posted @ 2014-12-09 10:15 阳光小屋 阅读(1514) 评论(3) 推荐(1) 编辑
摘要: Boolean createdNew; //返回是否赋予了使用线程的互斥体初始所属权 System.Threading.Mutex instance = new System.Threading.Mutex(true, "MutexName", out createdNew); //同步基元变量 i... 阅读全文
posted @ 2014-12-09 10:12 阳光小屋 阅读(401) 评论(1) 推荐(0) 编辑
摘要: gson和其他现有java json类库最大的不同时gson需要序列化得实体类不需要使用annotation来标识需要序列化得字段,同时gson又可以通过使用annotation来灵活配置需要序列化的字段。下面是一个简单的例子:Person实体public class Person { pri... 阅读全文
posted @ 2014-12-09 10:02 阳光小屋 阅读(114) 评论(0) 推荐(0) 编辑
摘要: import java.io.IOException;import java.io.InputStream;import java.io.OutputStreamWriter;import java.net.HttpURLConnection;import java.net.URL;public c... 阅读全文
posted @ 2014-12-09 09:54 阳光小屋 阅读(1171) 评论(0) 推荐(0) 编辑