| | |
| | | |
| | | |
| | | public static String base64ToFile(String base64Str, String savePath, String fileName) { |
| | | String fileDir = DateUtil.dateToString(new Date(), DateUtil.DATE_FORMAT_NO_SPLITE_DD); |
| | | |
| | | File dir = new File(savePath + fileDir); |
| | | |
| | | File dir = new File(savePath); |
| | | if (!dir.isDirectory()) { |
| | | dir.mkdir(); |
| | | } |
| | |
| | | BufferedOutputStream bos = null; |
| | | FileOutputStream fos = null; |
| | | File file = null; |
| | | String filePathAndName = savePath + fileDir + File.separator + fileName; |
| | | String filePathAndName = dir + File.separator + fileName; |
| | | BASE64Decoder decoder = new BASE64Decoder(); |
| | | byte[] bfile = new byte[0]; |
| | | try { |