public static String getDeviceInfo(Context context) { try{ org.json.JSONObject json = new org.json.JSONObject(); android.telephony.Teleph...
分类:
移动开发 时间:
2014-10-10 17:49:44
阅读次数:
215
1、使用try{ }catch{ }catch{ }…finally{} 一般finally放的是无论try里面是否执行的语句,比如说数据库的关闭,网络连接的关闭等等。 2、数据库使用完成后,cusor和库都关闭最好,要不2.3下库不关闭会出警告。(貌似4.0以上不出警告).。 3、数据库访问程是单...
分类:
数据库 时间:
2014-10-10 14:26:44
阅读次数:
163
1. 自定义user-service后,封装自定义异常信息返回 ? 通常情况下,抛UsernameNotFoundException异常信息是捕捉不了,跟踪源码后发现 ? ? Java代码?? try?{?? ????user?=?retrieveUser(username,?(...
分类:
编程语言 时间:
2014-10-10 13:36:24
阅读次数:
401
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again兄弟Ruiy哥的解决方案是从OS一样的系统scp /e tc/yum.repo.d/下的所有repo到本机的这个地方就O...
分类:
其他好文 时间:
2014-10-10 13:12:44
阅读次数:
173
1, .intern() method, return Stringcall .intern() method, will try to add current string into the pool, if the pool already has the string, the method ...
分类:
其他好文 时间:
2014-10-10 00:22:31
阅读次数:
209
public static string SendMsg(string fxPhone, string fxPassword, string toPhone, string msg) { try { strin...
分类:
Web程序 时间:
2014-10-09 23:26:41
阅读次数:
178
Liunx:static void Main(string[] args) { try { string[] groups = new string[] { "Admin", "Back_End", "CSharp", "Developer", "Faserati",...
分类:
其他好文 时间:
2014-10-09 23:02:21
阅读次数:
204
private byte[] Compression(byte[] data, CompressionMode mode) { DeflateStream zip = null; try { ...
分类:
其他好文 时间:
2014-10-09 15:55:04
阅读次数:
251
// 1、生成XML @Test public void createApplicationConfigXML(){ //建立document对象 try { Docume...
分类:
编程语言 时间:
2014-10-09 14:49:48
阅读次数:
216
Java提供了两类主要的异常:runtime exception和checked exception。checked 异常也就是我们经常遇到的IO异常,以及SQL异常都是这种异常。对于这种异常,JAVA编译器强制要求我们必需对出现的这些异常进行catch。所以,面对这种异常不管我们是否愿意,只能自己...
分类:
其他好文 时间:
2014-10-09 14:23:53
阅读次数:
198