Here you can find the source of getBoolean(java.nio.ByteBuffer buffer)
public static boolean getBoolean(java.nio.ByteBuffer buffer)
//package com.java2s; public class Main { public static boolean getBoolean(java.nio.ByteBuffer buffer) { return !((byte) 0 == buffer.get()); // 0 = false, non-zero = true }/* w w w . j a v a 2s . c o m*/ }