日期:2014-05-17 浏览次数:21168 次
public static String byteToImage(byte[] byte1) { String fileName = System.currentTimeMillis()+ ".jpg"; try { File filePic = new File(“E://”+fileName); if(!filePic.getParentFile().isDirectory()){ (new File(filePic.getParent())).mkdirs(); } FileOutputStream fos =new FileOutputStream(filePic); fos.write(byte1); fos.flush(); fos.close(); } catch (IOException e) { e.printStackTrace(); } return fileName; }