code: public void setMaskBits(int mask) throws IllegalArgumentException {
  
      if ((mask > MASK_MAX) || (mask < 0)) {
        throw new IllegalArgumentException("File mode mask out of range: " + mask);
      }
      this.maskBits = mask;
    }
docs: This method sets the bitwise encoded {@link #getMaskBits() mask}.
  
  @param mask the mask to set.
  @throws IllegalArgumentException if the given {@code mask} is negative or greater than {@code 07777} (==
  {@code 0xFFF} == {@code 4095}).