Java Hex Calculate toHex(byte b)

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

Description

to Hex

License

Open Source License

Declaration

public static String toHex(byte b) 

Method Source Code

//package com.java2s;

public class Main {

    public static String toHex(byte b) {
        char[] buf = new char[2];
        for (int i = 0; i < 2; i++) {
            // buf[1 - i] = digits[b & 0xF];
            b = (byte) (b >>> 4);
        }/*from  w  w w .  j a v  a 2s  . c  o  m*/
        return new String(buf);
    }
}

Related

  1. toHex(byte b)
  2. toHex(byte b)
  3. toHex(byte b)
  4. tohex(byte b)
  5. toHex(byte b)
  6. toHex(byte b)
  7. toHex(byte b)
  8. toHex(byte b)
  9. toHex(byte b)