a.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:letv 作者:
protected static final String a(Bitmap bitmap, String str, String str2) {
    File file = new File(str);
    if (!file.exists()) {
        file.mkdirs();
    }
    String stringBuffer = new StringBuffer(str).append(str2).toString();
    File file2 = new File(stringBuffer);
    if (file2.exists()) {
        file2.delete();
    }
    if (bitmap != null) {
        try {
            OutputStream fileOutputStream = new FileOutputStream(file2);
            bitmap.compress(CompressFormat.JPEG, 80, fileOutputStream);
            fileOutputStream.flush();
            fileOutputStream.close();
            bitmap.recycle();
            return stringBuffer;
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e2) {
            e2.printStackTrace();
        }
    }
    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号