前几天想在android实现一个png转jpg的功能,就在网上搜了一下,好几个地方都出现了如下这段让人无力吐槽的代码
byte[] b=null;
File PNG = null;
BufferedOutputStream stream = null;
try {
PNG = new File(outputFile);
FileOutputStream fstream = new FileOutputStream(PNG);
stream = new BufferedOutputStream(fstream);
stream.write(b);
} catch (Exception e) {
// log.error("helper:get file from byte process error!");
e.printStackTrace();
} finally {