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

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

Description

append Hex

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  ww  . jav  a  2  s . c  o  m*/
}

Related

  1. isHexChar(char ch)
  2. isHexChar(String hexString, boolean checkSpaceFlag)
  3. isHexChar(String hexString)
  4. toHexChar(int nibble)