Java Byte Array to Char convertByteToChar(byte input)

Here you can find the source of convertByteToChar(byte input)

Description

convert Byte To Char

License

Open Source License

Declaration

public static char convertByteToChar(byte input) 

Method Source Code

//package com.java2s;

public class Main {

    public static char convertByteToChar(byte input) {
        if ((int) input < 10) {
            return (char) (input + '0');
        } else {/*from ww  w.  ja v  a  2 s .  c o m*/
            return (char) ('A' + (int) input - 10);
        }
    }
}

Related

  1. bytesToChar(byte[] arr, int pos)
  2. bytesToChar(byte[] b)
  3. bytesToChar(byte[] bytes)
  4. bytesToChar(byte[] bytes)
  5. bytesToChar(byte[] bytes)
  6. convertByteToChar(byte[] source, int srclen)
  7. convertByteToCharArray(byte aByte)