Retrieves all the available <code>Charset</code>s on the platform,
among which the default <code>charset</code>.

@return an array of <code>Charset</code>s.
960323
public static Charset[] getAvailableCharsets() {
        Collection collection = Charset.availableCharsets().values();
        return (Charset[]) collection.toArray(new Charset[collection.size()]);
    }
1335751
public char[] toCharArray() {
        return collectSized(CharBuffer::new, CharBuffer::add, CharBuffer::addAll, CharBuffer::new,
            CharBuffer::addUnsafe).toArray();
    }
1011882
public static function get_charset()
    {
        if (self::$default_charset) {
            return self::$default_charset;
        }

        if ($charset = rcube::get_instance()->config->get('default_charset')) {
            return $charset;
        }

        return RCUBE_CHARSET;
    }
170340
public String getString(Charset charset) throws IOException
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        byte cc = get();
        while (cc != 0)
        {
            baos.write(cc);
            cc = get();
        }
        byte[] buf = baos.toByteArray();
        return new String(buf, charset);
    }
218031
@Nonnull
  @ReturnsMutableCopy
  public static char [] getAsCharArray (@Nonnull final Set <Character> aChars)
  {
    ValueEnforcer.notNull (aChars, "Chars");

    final char [] ret = new char [aChars.size ()];
    int nIndex = 0;
    for (final Character aChar : aChars)
      ret[nIndex++] = aChar.charValue ();
    return ret;
  }
974292
def get_charset(message, default="utf-8"):
    """"""
    if message.get_content_charset():
        return message.get_content_charset()
    if message.get_charset():
        return message.get_charset()
    return default
1223284
public Charset getCharsetParameter() {
    String value = getParameter("charset");
    return value == null ? null : Charset.forName(value);
  }
669424
protected Charset getCharSet() {
		String contentType = urlConnection.getContentType();
		Charset charset = Charset.forName("iso-8859-1"); // default charset
		if (contentType != null) {
			// find out about the charset from the URLConnection
			Matcher m = charsetPattern.matcher(contentType);
			if (m.find()) {
				String charsetString = m.group(1);
				try {
					charset = Charset.forName(charsetString);
				} catch (IllegalCharsetNameException e) {
					e.printStackTrace();
				} catch (IllegalArgumentException e) {
					e.printStackTrace();
				}
			}
		}
		return charset;
	}
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 + "\")";
        }
    }
84155
public java.lang.String getCharset() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.charset);

    }
93398
private String getCharacterSet(final CommandLineCompilerConfiguration compilerConfig) {
    final String[] args = compilerConfig.getPreArguments();
    String charset = "0";
    for (final String arg : args) {
      if ("/D_UNICODE".equals(arg) || "/DUNICODE".equals(arg)) {
        charset = "1";
      }
      if ("/D_MBCS".equals(arg)) {
        charset = "2";
      }
    }
    return charset;
  }
662489
private static Charset getCharset(MediaType mediaType)
	{
		String charsetName = mediaType.getParameters().get(MediaType.CHARSET_PARAMETER);
		Charset charset;
		
		if (charsetName != null)
		{
			charset = Charset.forName(charsetName);
		}
		else
		{
			charset = DEFAULT_CHARSET;
		}
		
		return charset;
	}
1268408
def charset(self):
        """"""
        header = self.environ.get('CONTENT_TYPE')
        if header:
            ct, options = parse_options_header(header)
            charset = options.get('charset')
            if charset:
                if is_known_charset(charset):
                    return charset
                return self.unknown_charset(charset)
        return self.default_charset
1104979
public char[] getCharacters() {
        if (c.length == length) {
            return c;
        }
        char[] chars = new char[length];
        System.arraycopy(c, 0, chars, 0, length);
        return chars;
    }
528933
public String getCharacterEncoding() {

		if (this.message.getContentEncoding() != null) {
			return this.message.getContentEncoding().getEncoding();
		} else {
			ContentTypeHeader cth = (ContentTypeHeader)
				this.message.getHeader(ContentTypeHeader.NAME);
			if(cth == null) return null;
			return cth.getParameter("charset");
		}
	}
34297
public function getCharSet()
    {
        if ($this->_sCharSet == null) {
            $this->_sCharSet = \OxidEsales\Eshop\Core\Registry::getLang()->translateString('charset');
        }

        return $this->_sCharSet;
    }
138341
public function chars()
    {
        $chars = [];
        for ($i = 0, $l = $this->length(); $i < $l; $i++) {
            $chars[] = $this->at($i)->str;
        }

        return $chars;
    }