Android Byte to Hex Convert byteToHex(byte b)

Here you can find the source of byteToHex(byte b)

Description

byte To Hex

Declaration

static public String byteToHex(byte b) 

Method Source Code

//package com.java2s;

public class Main {
    static public String byteToHex(byte b) {
        char hexDigit[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
                '9', 'a', 'b', 'c', 'd', 'e', 'f' };
        char[] array = { hexDigit[(b >> 4) & 0x0f], hexDigit[b & 0x0f] };
        return new String(array);
    }//from   w ww  .  j  ava 2s.  c om
}

Related

  1. getHexString(byte i)
  2. toHexString(byte b)
  3. toHexString(byte byt)
  4. getBinaryStrFromByte(byte b)
  5. getBinaryString(byte src)
  6. byteToHex(byte data)
  7. byteToHex(byte data)