| 22 | private static final Logger LOGGER = LoggerFactory.getLogger(EasyExcelUtil.class); |
| 23 | |
| 24 | public static <T> List<T> read(String filePath, final Class<?> clazz) { |
| 25 | File f = new File(filePath); |
| 26 | try (FileInputStream fis = new FileInputStream(f)) { |
| 27 | return read(fis, clazz); |
| 28 | } catch (FileNotFoundException e) { |
| 29 | LOGGER.error("文件{}不存在", filePath, e); |
| 30 | } catch (IOException e) { |
| 31 | LOGGER.error("文件读取出错", e); |
| 32 | } |
| 33 | return null; |
| 34 | } |
| 35 | |
| 36 | public static <T> List<T> read(InputStream inputStream, final Class<?> clazz) { |
| 37 | if (inputStream == null) { |