Java Utililty Methods Hex String Create

List of utility methods to do Hex String Create

Description

The list of methods to do Hex String Create are organized into topic(s).

Method

voidappendHex(final StringBuffer buf, final byte i)
append Hex
buf.append(Character.forDigit((i & 0xf0) >> 4, 16));
buf.append(Character.forDigit((i & 0x0f), 16));
voidappendHex(final StringBuffer buf, final int i)
append Hex
buf.append(Integer.toHexString((i >> 24) & 0xff));
buf.append(Integer.toHexString((i >> 16) & 0xff));
buf.append(Integer.toHexString((i >> 8) & 0xff));
buf.append(Integer.toHexString(i & 0xff));
voidappendHex(int color, StringBuffer buffer)
append Hex
String string = Integer.toHexString(color).toUpperCase();
if (string.length() == 1) {
    buffer.append("0"); 
buffer.append(string);
voidappendHex(StringBuffer buf, int x)
append Hex
appendHexChar(buf, (x >> 4) & 0x0f);
appendHexChar(buf, x & 0x0f);
voidappendHex(StringBuffer buffer, byte b)
append Hex
buffer.append(hexDigit[(b >> 4) & 15]).append(hexDigit[b & 15]);
voidappendHex(StringBuffer buffer, int value)
append Hex
buffer.append(HEX_LOOKUP[value]);
voidappendHex(StringBuffer sb, byte b)
append Hex
sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));
voidappendHex(StringBuffer sbuf, char ch)
append Hex
int firstLiteral = ch / 256;
int secLiteral = ch % 256;
if (firstLiteral == 0 && secLiteral < 127) {
    sbuf.append("%");
    sbuf.append(Integer.toHexString(secLiteral).toUpperCase());
    return;
if (ch <= 0x07ff) {
...
voidappendHex(StringBuffer stringbuffer, byte byte0)
append Hex
stringbuffer.append(toHexChar(byte0 >> 4));
stringbuffer.append(toHexChar(byte0));
voidappendHex(StringBuilder bld, byte b)
append Hex
bld.append(hexChars[(b & 0xf0) >> 4]);
bld.append(hexChars[b & 0x0f]);