code: public static FileAccessPermissions createByUmask(int umask, boolean isDirectory) {
  
      int fullAccessMask;
      if (isDirectory) {
        fullAccessMask = MASK_FULL_DIRECTORY_ACCESS;
      } else {
        fullAccessMask = MASK_FULL_FILE_ACCESS;
      }
      int mask = fullAccessMask & ~umask;
      return new FileAccessPermissions(mask);
    }
docs: This method create a new {@link FileAccessPermissions} instance according to the given
  <code><a href="http://en.wikipedia.org/wiki/Umask">umask</a></code> (user file creation mode mask).
  
  @param umask is the umask.
  @param isDirectory {@code true} if the the {@link FileAccessPermissions} is to be created for a directory,
  {@code false} for a regular file.
  @return the according {@link FileAccessPermissions}.