@Test public void testHelloWorldUpperCaseHex() { final byte[] b = StringUtils.getBytesUtf8("Hello World"); final String expected = "48656C6C6F20576F726C64"; char[] actual; actual = Hex.encodeHex(b); assertFalse(expected.equals(new String(actual))); actual = Hex.encodeHex(b, true); assertFalse(expected.equals(new String(actual))); actual = Hex.encodeHex(b, false); assertTrue(expected.equals(new String(actual))); }
public static char[] encodeHex(final byte[] data) { return encodeHex(data, true); }
Hex implements BinaryEncoder, BinaryDecoder { public static char[] encodeHex(final byte[] data) { return encodeHex(data, true); } }
Hex implements BinaryEncoder, BinaryDecoder { public static char[] encodeHex(final byte[] data) { return encodeHex(data, true); } Hex();  Hex(final Charset charset);  Hex(final String charsetName); }
Hex implements BinaryEncoder, BinaryDecoder { public static char[] encodeHex(final byte[] data) { return encodeHex(data, true); } Hex();  Hex(final Charset charset);  Hex(final String charsetName); static byte[] decodeHex(final char[] data); static char[] encodeHex(final byte[] data); static char[] encodeHex(final byte[] data, final boolean toLowerCase); static String encodeHexString(final byte[] data); @Override byte[] decode(final byte[] array); @Override Object decode(final Object object); @Override byte[] encode(final byte[] array); @Override Object encode(final Object object); Charset getCharset(); String getCharsetName(); @Override String toString(); }
Hex implements BinaryEncoder, BinaryDecoder { public static char[] encodeHex(final byte[] data) { return encodeHex(data, true); } Hex();  Hex(final Charset charset);  Hex(final String charsetName); static byte[] decodeHex(final char[] data); static char[] encodeHex(final byte[] data); static char[] encodeHex(final byte[] data, final boolean toLowerCase); static String encodeHexString(final byte[] data); @Override byte[] decode(final byte[] array); @Override Object decode(final Object object); @Override byte[] encode(final byte[] array); @Override Object encode(final Object object); Charset getCharset(); String getCharsetName(); @Override String toString(); static final Charset DEFAULT_CHARSET; static final String DEFAULT_CHARSET_NAME; }