Checksum { public static String getHex(byte[] raw) { if (raw == null) return null; final StringBuilder hex = new StringBuilder(2 * raw.length); for (final byte b : raw) hex.append(HEXES.charAt((b & 0xF0) >> 4)).append(HEXES.charAt((b & 0x0F))); return hex.toString(); }  static String getHex(byte[] raw); static String getMD5Checksum(String string); static String getMD5Checksum(File file);  }
@Test public void testHex() throws Exception { assertNull(Checksum.getHex(null)); }