List of utility methods to do Byte Array Encode
String | encodeHex(byte[] bytes) encode Hex char[] buff = new char[bytes.length * 2]; for (int i = 0; i < bytes.length; i++) { int h0 = (bytes[i] >> 4) & 0x0f; int h1 = bytes[i] & 0x0f; buff[i * 2] = HEX_MAP[h0]; buff[i * 2 + 1] = HEX_MAP[h1]; return new String(buff); ... |
String | encodeHex(byte[] bytes) encode Hex if (bytes == null) { return ""; try { byte[] hex = new byte[2 * bytes.length]; int index = 0; for (byte b : bytes) { int v = b & 0xFF; ... |