List of utility methods to do Hex Calculate
String | toHexStringLE(byte n) to Hex String LE return byteArrayToHexString(toByteArrayLE(n));
|
String | toHexStringUpperCase(byte[] b) to Hex String Upper Case StringBuffer sb = new StringBuffer(); for (int i = 0; i < b.length; i++) { sb.append(hexCharsUpperCase[(int) (((int) b[i] >> 4) & 0x0f)]); sb.append(hexCharsUpperCase[(int) (((int) b[i]) & 0x0f)]); return sb.toString(); |
String | toHexTable(byte[] byteSrc, int lengthOfLine) to Hex Table return toHexTable(byteSrc, lengthOfLine, 7);
|
String | toHexText(byte[] bytes, int length) Converts the specified byte array up to the specified length into a hexadecimal text. if (bytes == null) return "null"; if (length > bytes.length) length = bytes.length; StringBuilder sb = new StringBuilder(); if (16 < length) sb.append('\n'); for (int index = 0; index < length; ++index) { ... |
String | toHexUtil(int n) to Hex Util String rt = ""; switch (n) { case 10: rt += "A"; break; case 11: rt += "B"; break; ... |
String | toHexValue(int number) to Hex Value StringBuilder builder = new StringBuilder(Integer.toHexString(number & 0xff)); while (builder.length() < 2) { builder.append("0"); return builder.toString().toUpperCase(); |
String | toHexWithMarker(byte b) to Hex With Marker StringBuilder sb = new StringBuilder(); sb.append("0x").append(toHex(b)); return sb.toString(); |