2019年1月29日

将文件File转换成byte数组

摘要: /** * 将文件转换成byte数组 * @param filePath * @return */ public static byte[] File2byte(File tradeFile){ byte[] buffer = null; try { FileInputStre... 阅读全文

posted @ 2019-01-29 15:31 sometimes-ever 阅读(36003) 评论(0) 推荐(2) 编辑

16进制的字符串转化为utf-8格式的字符串(例31转1)

摘要: public static String toStringHex1(String s) { byte[] baKeyword = new byte[s.length() / 2]; for (int i = 0; i < baKeyword.length; i++) { try { baKeyword[i] = (byte)... 阅读全文

posted @ 2019-01-29 15:29 sometimes-ever 阅读(2136) 评论(0) 推荐(0) 编辑

导航