MCPcopy Create free account
hub / github.com/Bit0r/java-util / read

Method read

src/main/java/util/EasyExcelUtil.java:24–34  ·  view source on GitHub ↗
(String filePath, final Class<?> clazz)

Source from the content-addressed store, hash-verified

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) {

Callers 1

readFileMethod · 0.80

Calls 1

getRowsMethod · 0.95

Tested by

no test coverage detected