MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / bytesToHex

Method bytesToHex

src/test/java/com/amazon/ion/BinaryTest.java:44–58  ·  view source on GitHub ↗
(final byte[] bytes)

Source from the content-addressed store, hash-verified

42 }
43
44 public static String bytesToHex(final byte[] bytes)
45 {
46 StringBuilder builder = new StringBuilder();
47 for (int i = 0; i < bytes.length; i++)
48 {
49 byte octet = bytes[i];
50 int ordinal = octet & 0xFF;
51 builder.append(String.format("%02X", ordinal));
52 if ((i + 1) < bytes.length)
53 {
54 builder.append(' ');
55 }
56 }
57 return builder.toString();
58 }
59
60 public static String MAGIC_COOKIE = "E0 01 00 EA ";
61

Callers 2

dumpMethod · 0.95
reloadMethod · 0.95

Calls 2

toStringMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected