Code example for Charset

Methods: name

0
    public BasCharsetProvider() { 
        addCharsetImpl(new HexCharset()); 
    } 
 
    void addCharsetImpl(Charset charset) {
        charsetImpls.put(charset.name(), charset);
    } 
 
    @Override 
    public Iterator<Charset> charsets() {
        return charsetImpls.values().iterator();
    } 
 
    @Override 
    public Charset charsetForName(String charsetName) {
        for (String name : charsetImpls.keySet()) {
            Charset cs = charsetImpls.get(name);
            if (name.equals(charsetName))
                return cs;
            if (cs.aliases().contains(charsetName))
                return cs;