2015年11月30日

ip地址的正则表达式

摘要: "((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)\\.){3}((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)){1}";/** * Created by baiwenlong on 11/26/15. */public class IpUt... 阅读全文

posted @ 2015-11-30 14:58 bwlcool 阅读(1079) 评论(0) 推荐(0) 编辑

2014年1月22日

sqlite 获取用户消息列表多表查询语句

摘要: 很少写多表查询的语句,请教宏利得到的select m.msg as msg_content, m.type as msg_type, m.time as msg_time, m.state as msg_state, m.has_read as has_read, u.id as frien... 阅读全文

posted @ 2014-01-22 18:40 bwlcool 阅读(249) 评论(0) 推荐(0) 编辑

2013年9月10日

AES加解密

摘要: public class AESHelper { /** 算法/模式/填充 **/ private static final String CipherMode = "AES/ECB/PKCS5Padding"; /** 创建密钥 **/ private static SecretKeySp... 阅读全文

posted @ 2013-09-10 17:00 bwlcool 阅读(140) 评论(0) 推荐(0) 编辑

文件工具类

摘要: public class FileUtil { /** * 删除文件 * * @param context * 程序上下文 * @param fileName * 文件名,要在系统内保持唯一 * @return boolean 存储... 阅读全文

posted @ 2013-09-10 16:58 bwlcool 阅读(116) 评论(0) 推荐(0) 编辑

下载文件工具类

摘要: public class DownloadUtils { private static final int CONNECT_TIMEOUT = 10000; private static final int DATA_TIMEOUT = 40000; private final static... 阅读全文

posted @ 2013-09-10 16:55 bwlcool 阅读(107) 评论(0) 推荐(0) 编辑

2013年7月12日

拍照旋转图片

摘要: public class ImageUtil { public static final String TAG = ImageUtil.class.getSimpleName(); /** * 判断图片是否需要翻转(正方向的不用翻转) * * @param fileName * @... 阅读全文

posted @ 2013-07-12 13:34 bwlcool 阅读(126) 评论(0) 推荐(0) 编辑

2013年6月28日

判断当前显示的是否是桌面

摘要: boolean isHome = isHome(context, getHomes(context));private static List getHomes(Context context) { List names = new ArrayList(); PackageManag... 阅读全文

posted @ 2013-06-28 09:33 bwlcool 阅读(111) 评论(0) 推荐(0) 编辑

2013年6月27日

判断是否有响应Intent的app

摘要: /** * 获取能启动intent的app信息 * * @param context * @param intent * @return */ public static List getAppsForIntent(Context context, Intent inten... 阅读全文

posted @ 2013-06-27 18:27 bwlcool 阅读(136) 评论(0) 推荐(0) 编辑

android显示和隐藏键盘

摘要: public class KeyboardUtil { public static void hideSoftInput(Activity acitivity) { InputMethodManager imm = (InputMethodManager) acitivity .ge... 阅读全文

posted @ 2013-06-27 18:20 bwlcool 阅读(141) 评论(0) 推荐(0) 编辑

正则表达式判断身份证和提取生日

摘要: public class IDCardUtil { public static boolean isValidIdCard(String idCard) { if (idCard == null) { return false; } Pattern p = Pattern.comp... 阅读全文

posted @ 2013-06-27 18:17 bwlcool 阅读(3465) 评论(0) 推荐(0) 编辑

导航