| | |
| | | * @param filePath:文件路径 |
| | | * @return |
| | | */ |
| | | private static byte[] file2byte(String filePath) { |
| | | public static byte[] file2byte(String filePath) { |
| | | byte[] buffer = null; |
| | | try { |
| | | File file = new File(filePath); |
| | |
| | | |
| | | return basePath; |
| | | } |
| | | |
| | | public String getSnapFilePath(Date date) { |
| | | if (null == date) { |
| | | date = new Date(); |
| | | } |
| | | |
| | | String basePath = configData.getImgPath() + "SNAP/" |
| | | + DateFormatUtils.format(date, "yyyyMM") + "/"; |
| | | File file = new File(basePath); |
| | | if (!file.exists()) { |
| | | file.mkdirs(); |
| | | } |
| | | return basePath; |
| | | } |
| | | |
| | | public String getCommonFilePath(Date date) { |
| | | if (null == date) |
| | | date = new Date(); |
| | | |
| | | String basePath = configData.getImgPath() + "COMMON/" |
| | | + DateFormatUtils.format(date, "yyyyMM") + "/"; |
| | | |
| | | File file = new File(basePath); |
| | | if (!file.exists()) { |
| | | file.mkdirs(); |
| | | } |
| | | return basePath; |
| | | } |
| | | } |