Java Byte Array to Char bytesToChar(byte[] b)

Here you can find the source of bytesToChar(byte[] b)

Description

bytes To Char

License

Apache License

Declaration

public static char bytesToChar(byte[] b) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static char bytesToChar(byte[] b) {
        char c = (char) ((b[0] << 8) & 0xFF00L);
        c |= (char) (b[1] & 0xFFL);
        return c;
    }//from   ww  w  .  j  a v  a  2 s.c  o  m
}

Related

  1. bufferToChar(byte[] ioBuffer)
  2. bytesToChar(byte[] arr, int offset)
  3. bytesToChar(byte[] arr, int pos)
  4. bytesToChar(byte[] bytes)
  5. bytesToChar(byte[] bytes)
  6. bytesToChar(byte[] bytes)
  7. convertByteToChar(byte input)