code: public void setPermissionsFromUmaskString(String umask) {
  		if (umask.length() != 4) {
  			throw new IllegalArgumentException("umask length must be 4");
  		}
  
  		try {
  			setPermissions(new UnsignedInteger32(String.valueOf(Integer
  					.parseInt(umask, 8) ^ 0777)));
  		} catch (NumberFormatException ex) {
  			throw new IllegalArgumentException(
  					"umask must be 4 digit octal number");
  		}
  	}
docs: Set the permissions given a UNIX style umask, for example '0022' will
  result in 0022 ^ 0777.
  
  @param umask
  @throws IllegalArgumentException
  if badly formatted string