Find the character set based on the flags.
@param flags is the flags.
@return the character set.
320623
private static Charset getCharset(final int flags) throws AuthenticationException
    {
        if ((flags & FLAG_REQUEST_UNICODE_ENCODING) == 0) {
            return DEFAULT_CHARSET;
        } else {
            if (UNICODE_LITTLE_UNMARKED == null) {
                throw new AuthenticationException( "Unicode not supported" );
            }
            return UNICODE_LITTLE_UNMARKED;
        }
    }
1101302
function(r, flags) {
      var reg = allCharsReg(flags);
      return RegExp(r.source, getRegExpFlags(r).replace(reg, ''));
    }
909585
def key_flags(self):
        
        if 'KeyFlags' in self._signature.subpackets:
            return next(iter(self._signature.subpackets['h_KeyFlags'])).flags
        return set()
1311483
Set<RequiresFlag> readRequiresFlags(int flags) {
        Set<RequiresFlag> set = EnumSet.noneOf(RequiresFlag.class);
        for (RequiresFlag f: RequiresFlag.values()) {
            if ((flags & f.value) != 0)
                set.add(f);
        }
        return set;
    }
1287512
def _search_flags(self):
        
        return (self.checkBoxRegex.isChecked(),
                self.checkBoxCase.isChecked(),
                self.checkBoxWholeWords.isChecked(),
                self.checkBoxInSelection.isChecked())
1060731
protected int convertMatchFlags(Element opts) {
		int flags = 0;

		String sopts = ((StringProperty) opts).getValue();

		for (int i = 0; i < sopts.length(); i++) {
			char c = sopts.charAt(i);
			switch (c) {
			case 'i':
				flags |= Pattern.CASE_INSENSITIVE;
				break;
			case 's':
				flags |= Pattern.DOTALL;
				break;
			case 'm':
				flags |= Pattern.MULTILINE;
				break;
			case 'u':
				flags |= Pattern.UNICODE_CASE;
				break;
			case 'x':
				flags |= Pattern.COMMENTS;
				break;
			default:
				throw EvaluationException.create(sourceRange,
						MSG_INVALID_REGEXP_FLAG, c);
			}
		}

		return flags;
	}
167651
public int unset( final int    flags )
    {
        for (;;)
        {
            int    current = _flags.get();
            int    newValue = current & ~flags;

            if ( _flags.compareAndSet( current, newValue ) )
            {
                return current;
            }
        }
    }
885443
public static String printFlag(int flags)
    {
        StringBuffer sb = new StringBuffer();
        sb.append(Integer.toHexString(flags));
        sb.append("=");

        if (flags == XAResource.TMNOFLAGS)
        {
            sb.append("TMNOFLAGS");
        }
        else
        {
            if ((flags & XAResource.TMENDRSCAN)   != 0) sb.append("TMENDRSCAN|");
            if ((flags & XAResource.TMFAIL)       != 0) sb.append("TMFAIL|");
            if ((flags & XAResource.TMJOIN)       != 0) sb.append("TMJOIN|");
            if ((flags & XAResource.TMONEPHASE)   != 0) sb.append("TMONEPHASE|");
            if ((flags & XAResource.TMRESUME)     != 0) sb.append("TMRESUME|");
            if ((flags & XAResource.TMSTARTRSCAN) != 0) sb.append("TMSTARTRSCAN|");
            if ((flags & XAResource.TMSUCCESS)    != 0) sb.append("TMSUCCESS|");
            if ((flags & XAResource.TMSUSPEND)    != 0) sb.append("TMSUSPEND|");

            sb.deleteCharAt(sb.length() - 1);
        }
        return sb.toString();
    }
684559
public String
printFlags() {
	StringBuffer sb = new StringBuffer();

	for (int i = 0; i < 16; i++)
		if (validFlag(i) && getFlag(i)) {
			sb.append(Flags.string(i));
			sb.append(" ");
		}
	return sb.toString();
}
1090727
@GwtIncompatible("Unnecessary")
  private Charset getInputCharset() {
    if (!config.charset.isEmpty()) {
      if (!Charset.isSupported(config.charset)) {
        throw new FlagUsageException(config.charset +
            " is not a valid charset name.");
      }
      return Charset.forName(config.charset);
    }
    return UTF_8;
  }
164458
public boolean isAttrFlagSet(String name, int flags)
    {
        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    }
628427
public static String flagNames(long flags) {
        StringBuilder sbuf = new StringBuilder();
        int i = 0;
        long f = flags & StandardFlags;
        while (f != 0) {
            if ((f & 1) != 0) {
                sbuf.append(" ");
                sbuf.append(flagName[i]);
            }
            f = f >> 1;
            i++;
        }
        return sbuf.toString();
    }
168121
protected static Charset getCharset(final Map<String, String> properties) {
		String charsetName = properties.get("charset");
		try {
			return charsetName == null ? Charset.defaultCharset() : Charset.forName(charsetName);
		} catch (IllegalArgumentException ex) {
			InternalLogger.log(Level.ERROR, "Invalid charset: " + charsetName);
			return Charset.defaultCharset();
		}
	}
986054
public static ImmutableSet<Symbol> findReferencedIdentifiers(Tree tree) {
    ImmutableSet.Builder<Symbol> builder = ImmutableSet.builder();
    createFindIdentifiersScanner(builder, null).scan(tree, null);
    return builder.build();
  }
1218359
@Override
    public synchronized void setFlags(final Flags flag, final boolean set) throws MessagingException {

        super.setFlags(flag, set);

        if (flagChangeListener != null) {
            flagChangeListener.onFlagChange(this, flag, set);
        }

    }
354358
public static String charset(final String encoding)
    {
        final String charsetName = STD_CHARSETS.get(encoding);
        if (charsetName != null)
        {
            return "java.nio.charset.StandardCharsets." + charsetName;
        }
        else
        {
            return "java.nio.charset.Charset.forName(\"" + encoding + "\")";
        }
    }
835631
public static Charset[] getAvailableCharsets() {
        Collection collection = Charset.availableCharsets().values();
        return (Charset[]) collection.toArray(EMPTY_CHARSET_ARRAY);
    }