Android Byte Array to Char Convert getChar(byte[] bytes)

Here you can find the source of getChar(byte[] bytes)

Description

get Char

License

Open Source License

Declaration

public static char getChar(byte[] bytes) 

Method Source Code

//package com.java2s;

public class Main {
    public static char getChar(byte[] bytes) {
        return (char) ((0xff & bytes[0]) | (0xff00 & (bytes[1] << 8)));
    }//  ww  w.  jav a2 s.c o m

    public static char getChar(byte b) {
        return (char) (0xff & b);
    }
}

Related

  1. bytetoChar(byte[] bytes)
  2. getChar(byte[] b, int index)