Java Hex Calculate toHex(byte lowByte)

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

Description

to Hex

License

Open Source License

Declaration

public static char toHex(byte lowByte) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static char toHex(byte lowByte) {
        assert (lowByte < 16);
        if (lowByte < 10) {
            return (char) ('0' + lowByte);
        } else if (lowByte < 16) {
            return (char) ('A' + lowByte - 10);
        } else {/*from  ww  w.  ja  va 2  s. com*/
            return '?';
        }
    }
}

Related

  1. toHex(byte hash[])
  2. toHex(byte in)
  3. toHex(byte in[])
  4. toHex(byte in[])
  5. toHex(byte input[])
  6. toHex(byte n)
  7. toHex(byte one)
  8. toHex(byte value)
  9. toHex(byte value)