2019-11-27 23:33:33 +08:00
|
|
|
package com.windchat.im.boot.test;
|
2019-07-29 23:42:16 +08:00
|
|
|
|
|
|
|
import java.util.Base64;
|
|
|
|
|
2019-11-27 23:36:54 +08:00
|
|
|
import com.windchat.im.business.utils.FileServerUtils;
|
2019-07-29 23:42:16 +08:00
|
|
|
|
|
|
|
public class TestDefaultIcon {
|
|
|
|
public static void main(String args[]) {
|
|
|
|
// String fileUrl = "site-admin-icon.jpg";
|
|
|
|
String fileUrl = "管理.png";
|
|
|
|
byte[] fileBytes = FileServerUtils.fileToBinary(fileUrl);
|
|
|
|
|
|
|
|
String str = Base64.getEncoder().encodeToString(fileBytes);
|
|
|
|
System.out.println(str);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|