代码改变世界

随笔分类 -  java8

java8 file转base64

2018-09-18 16:08 by 如是我所闻, 1855 阅读, 收藏,
摘要: String filePath ="D:\\Alivin\\Temp\\img\\c.jpg"; byte[] b = Files.readAllBytes(Paths.get(filePath)); String s = Base64.getEncoder().encodeToString(b); 阅读全文