def toHexString(buff: Array[Byte], start: Int, length: Int): String = { val data = new Array[Byte](length) var j= 0 for (i <- start until start + length) { data(j) = buff(i) j = j+1 } var ret = "" for (b <- data) { var hex = (b & 0xFF).toHexString if (hex.length == 1) hex = '0' + hex ret = ret + hex.toUpperCase } ret }
by: 发表于:2017-09-20 10:13:36 顶(0) | 踩(0) 回复
??
回复评论