public static Boolean get(IntBuffer array, int index) {
    int value = array.get(index >>> 4) >> ((index & 15) << 1);
    switch (value & 3) {
      case 0:
        return false;
      case 1:
        return true;
      case 2:
        return null;
      default:
        throw new AssertionError();
    }
  }