public static boolean readBoolean(ByteBuffer buff){
  return buff.get() == 1;
}

public static boolean readBoolean ( ByteBuffer buff ) { return buff . get ( ) == 1 ; }
reads one byte as a boolean . its value is true if 1 and false if 0
