Here you can find the source of byteToBoolean(byte[] b)
public static boolean byteToBoolean(byte[] b)
//package com.java2s; //License from project: Apache License public class Main { public static boolean byteToBoolean(byte[] b) { if ((b[0] & 0xFF) == 0) { return false; } else {/*from w w w .jav a 2 s .c om*/ return true; } } }