摘要:
/** * 传入txt路径读取txt文件 * * @param txtPath * @return 返回读取到的内容 */ public String readTxt(String txtPath) { File file = new File(txtPath); if (file.isFile() 阅读全文
摘要:
/** * 本地文件转换成Base64字符串 */ public String convertFileToBase64(String Path) { byte[] data = null; // 读取字节数组 try { InputStream in = new FileInputStream(Pa 阅读全文
摘要:
private final char[] hexCode = "0123456789ABCDEF".toCharArray(); public String toHexString(byte[] data) { StringBuilder r = new StringBuilder(data.len 阅读全文