
io.scalecube.utils.HexUtil Maven / Gradle / Ivy
package io.scalecube.utils;
public final class HexUtil {
private HexUtil() {
// Do not instantiate
}
/**
* Converts bytes array to hex string.
*
* @param bytes bytes array
* @return hex string
*/
public static String toHex(byte[] bytes) {
StringBuilder sb = new StringBuilder();
for (byte b : bytes) {
sb.append(String.format("%02x", b));
}
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy