Here you can find the source of toChar(byte[] b, int off)
public static char toChar(byte[] b, int off)
//package com.java2s; //License from project: Apache License public class Main { public static char toChar(byte[] b) { return toChar(b, 0); }/*from w w w .j av a 2 s . c om*/ public static char toChar(byte[] b, int off) { return (char) (((b[off + 1] & 0xFF) << 0) + ((b[off + 0] & 0xFF) << 8)); } }