List of utility methods to do Byte to Hex
String | byteToHex(final byte b) Retrieves a string representation of the provided byte in hexadecimal. return BYTE_HEX_STRINGS[UPPER_CASE][b & 0xFF];
|
String | byteToHex(final byte b) Convert a byte to it's hexadecimal equivalent. return Integer.toHexString(b & MINUS_ONE);
|
void | byteToHex(final byte b, StringBuilder buffer) byte To Hex int i = b & 0xFF;
buffer.append(_hex[i >>> 4]);
buffer.append(_hex[i & 0x0F]);
|
String | byteToHex(final byte value) byte To Hex if ((value & 0xFF) < 16) { return "0" + Integer.toHexString(value & 0xFF); } else { return Integer.toHexString(value & 0xFF); |
String | byteToHex(final byte value, final int minLength) byte To Hex String hex = Integer.toHexString(value & 0xff); if (hex.length() < minLength) { for (int i = 0; i < (minLength - hex.length()); i++) hex = '0' + hex; return hex; |
String | byteToHex(final byte[] data) byte To Hex final StringBuilder hex = new StringBuilder(); for (int i = 0; i < data.length; i++) { hex.append(String.format("%02x", data[i])); return hex.toString(); |
String | byteToHex(int v) Returns a two char hexadecimal String representation of a single byte. String hstr; hstr = Integer.toString(v & 0xff, 16); return hstr.length() == 1 ? "0" + hstr : hstr; |