formatByte static method

String formatByte(
  1. int byte
)

Format a single byte as hex (e.g., 0x0A -> "0A")

Implementation

static String formatByte(int byte) {
  return byte.toRadixString(16).padLeft(2, '0').toUpperCase();
}