Here you can find the source of toBoolean(byte[] b)
public static boolean toBoolean(byte[] b)
//package com.java2s; //License from project: Apache License public class Main { public static boolean toBoolean(byte[] b) { return toBoolean(b, 0); }// w ww . j a v a2 s. c o m public static boolean toBoolean(byte[] b, int off) { return b[off] != 0; } }