Java Hex String Create appendHex(StringBuffer sb, byte b)

Here you can find the source of appendHex(StringBuffer sb, byte b)

Description

append Hex

License

Open Source License

Declaration

private static void appendHex(StringBuffer sb, byte b) 

Method Source Code

//package com.java2s;

public class Main {
    private final static String HEX = "0123456789abcdef";

    private static void appendHex(StringBuffer sb, byte b) {
        sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));
    }/*from  w w  w  .j a v a2 s.co m*/
}

Related

  1. appendHex(final StringBuffer buf, final int i)
  2. appendHex(int color, StringBuffer buffer)
  3. appendHex(StringBuffer buf, int x)
  4. appendHex(StringBuffer buffer, byte b)
  5. appendHex(StringBuffer buffer, int value)
  6. appendHex(StringBuffer sbuf, char ch)
  7. appendHex(StringBuffer stringbuffer, byte byte0)
  8. appendHex(StringBuilder bld, byte b)
  9. appendHex(StringBuilder buf, int value, int width)