Android工具类搜集
来源:互联网 发布:台湾也用淘宝吗 编辑:程序博客网 时间:2024/06/06 19:24
1.检测图片是否被加工过
/**
** @param 图片路径
* @param 检验的数据集
* @return
*/
public static String checkImagePs(String path, List<String> psKey) {
File file = new File(path);
if (!file.exists()) return "";
Logger.d("checkImage---->start", file.getName());
String res = "";
FileInputStream fo = null;
ByteArrayOutputStream bos = null;
try {
fo = new FileInputStream(file);
bos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length;
length = fo.read(buffer);
bos.write(buffer, 0, length);
String s = new String(buffer, "utf-8");
Logger.d("原数据:", s);
for (String str : psKey) {
Logger.d("检查过程", "psk:" + str + "");
if (s.contains(str)) {
res = str;
Logger.d("图片检测结果:", str);
return res;
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (fo != null)
fo.close();
if (bos != null)
bos.close();
} catch (Exception e2) {
// TODO: handle exception
e2.printStackTrace();
}
}
return res;
}
0 0
- Android工具类搜集
- Android开发不得不搜集的工具类集合
- Android 持续搜集关于Android使用工具
- 个人搜集的工具类使用指导
- 信息搜集整理工具
- SEO工具搜集
- 性能工具大搜集
- 工具使用链接搜集
- 数据可视化工具搜集总结
- 搜集的几个设计工具
- kali搜集工具之CDPSnarf
- 在线工具地址搜集(二)
- Tweet信息搜集工具tinfoleak
- 在线工具地址搜集(三)
- javascript标绘工具资料搜集
- android 事例源码 搜集
- Android 资料搜集
- Android颜色搜集
- es 常用查询介绍
- 非关系型数据库redis(二):Redis配置
- Android开发---简易好用的轮播器
- JDK、JRE、JVM三者间的关系
- ios计算文本的宽高
- Android工具类搜集
- node.js池操作
- 在xib上给UIView添加边框或圆角
- web.xml中log4j配置注意点
- [编程语言][C语言]指针与地址
- 云端观察:Joe Weinman的云经济学究竟在讲什么?
- Eclipse 使用经验总结
- 网络基础知识--iso/osi 和tcp-ip协议
- android sharedpreferences使用问题