Java Hex String Create appendHexString(StringBuilder builder, int value)

Here you can find the source of appendHexString(StringBuilder builder, int value)

Description

append Hex String

License

Apache License

Declaration

private static void appendHexString(StringBuilder builder, int value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static void appendHexString(StringBuilder builder, int value) {
        String hex = Integer.toHexString(value);
        if (hex.length() == 1) {
            builder.append("0");
        }/* w  w w .  ja  v  a 2s .com*/
        builder.append(hex);
    }
}

Related

  1. appendHexNumber(StringBuffer target, byte b)
  2. appendHexPair(byte b, StringBuffer sb)
  3. appendHexStream(StringBuilder sb, byte[] bytes, String delimiter, boolean prefixEachValue, boolean upperCase)
  4. appendHexString(StringBuffer buffer, byte data)
  5. appendHexString(StringBuilder buffer, byte[] bytes)
  6. appendHexValue(final StringBuffer sb, final byte data)
  7. appendHexValue(StringBuffer buffer, byte b)