Here you can find the source of getChar(byte[] bytes)
public static char getChar(byte[] bytes)
//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); } }