Here you can find the source of getChar(byte[] b, int index)
public static char getChar(byte[] b, int index)
//package com.java2s; public class Main { public static char getChar(byte[] b, int index) { int s = 0; if (b[index + 1] > 0) s += b[index + 1];/*from w w w . jav a 2s . co m*/ else s += 256 + b[index + 0]; s *= 256; if (b[index + 0] > 0) s += b[index + 1]; else s += 256 + b[index + 0]; char ch = (char) s; return ch; } }