code: public AccessControlList generateChildFileACL(Short umask) {
      Mode defaultMode = new Mode(umask);
      AccessControlList acl = new AccessControlList();
      acl.mOwningUser = mOwningUser;
      acl.mOwningGroup = mOwningGroup;
      acl.mMode = mMode;
      if (mExtendedEntries == null) {
        acl.mExtendedEntries = null;
        // minimal acl so we use defaultMode to filter user/group/other
        acl.mMode = Mode.and(new Mode(mMode), defaultMode).toShort();
      } else {
        // Rules for having extended entries, we need to modify user, mask and others'
        // permission to be filtered by the defaultMode
        acl.mExtendedEntries = new ExtendedACLEntries(mExtendedEntries);
  
        // mask is filtered by the group bits from the umask parameter
        AclActions mask = acl.mExtendedEntries.getMask();
        AclActions groupAction = new AclActions();
        groupAction.updateByModeBits(defaultMode.getGroupBits());
        mask.mask(groupAction);
        // user is filtered by the user bits from the umask parameter
        // other is filtered by the other bits from the umask parameter
        Mode updateMode = new Mode(mMode);
        updateMode.setOwnerBits(updateMode.getOwnerBits().and(defaultMode.getOwnerBits()));
        updateMode.setOtherBits(updateMode.getOtherBits().and(defaultMode.getOtherBits()));
        acl.mMode = updateMode.toShort();
      }
      return acl;
    }
docs: create a child file 's accessACL based on the default ACL.
  @param umask file's umask
  @return child file's access ACL