@Test public void testBytes2Hex() { byte[] bytes = new byte[]{-1, -2, -3, -128, 0, 127}; String expectedHex = "fffefd80007f"; assertEquals(expectedHex, BitConverters.bytes2hex(bytes)); }
public static String bytes2hex(byte[] bytes) { StringBuilder sb = new StringBuilder(); int i; int lo; int hi; for (i = 0; i < bytes.length; i++) { sb.append(byte2hex(bytes[i])); } return sb.toString(); }
BitConverters { public static String bytes2hex(byte[] bytes) { StringBuilder sb = new StringBuilder(); int i; int lo; int hi; for (i = 0; i < bytes.length; i++) { sb.append(byte2hex(bytes[i])); } return sb.toString(); } }
BitConverters { public static String bytes2hex(byte[] bytes) { StringBuilder sb = new StringBuilder(); int i; int lo; int hi; for (i = 0; i < bytes.length; i++) { sb.append(byte2hex(bytes[i])); } return sb.toString(); }  }
BitConverters { public static String bytes2hex(byte[] bytes) { StringBuilder sb = new StringBuilder(); int i; int lo; int hi; for (i = 0; i < bytes.length; i++) { sb.append(byte2hex(bytes[i])); } return sb.toString(); }  static String int16bit2hex(int i16); static int hex16bit2int(String in); static int nibble2Int(byte nibble); static byte int2Nibble(int in); static int ubyte2int(byte in); static byte int2ubyte(int in); static String byte2hex(byte ubyte); static byte[] uint2bytes(int in); static String bytes2hex(byte[] bytes); }
BitConverters { public static String bytes2hex(byte[] bytes) { StringBuilder sb = new StringBuilder(); int i; int lo; int hi; for (i = 0; i < bytes.length; i++) { sb.append(byte2hex(bytes[i])); } return sb.toString(); }  static String int16bit2hex(int i16); static int hex16bit2int(String in); static int nibble2Int(byte nibble); static byte int2Nibble(int in); static int ubyte2int(byte in); static byte int2ubyte(int in); static String byte2hex(byte ubyte); static byte[] uint2bytes(int in); static String bytes2hex(byte[] bytes);  }