FileDocCategorySizeDatePackage
CharsetProvider.javaAPI DocAndroid 1.5 API3612Wed May 06 22:42:46 BST 2009com.beetstra.jutf7

CharsetProvider

public class CharsetProvider extends CharsetProvider

Charset service-provider class used for both variants of the UTF-7 charset and the modified-UTF-7 charset.

author
Jaap Beetstra

Fields Summary
private static final String
UTF7_NAME
private static final String
UTF7_O_NAME
private static final String
UTF7_M_NAME
private static final String[]
UTF7_ALIASES
private static final String[]
UTF7_O_ALIASES
private static final String[]
UTF7_M_ALIASES
private Charset
utf7charset
private Charset
utf7oCharset
private Charset
imap4charset
private List
charsets
Constructors Summary
public CharsetProvider()


      
        charsets = Arrays.asList(new Object[] {
                utf7charset, imap4charset, utf7oCharset
        });
    
Methods Summary
public java.nio.charset.CharsetcharsetForName(java.lang.String charsetName)
{@inheritDoc}

        charsetName = charsetName.toUpperCase();
        for (Iterator iter = charsets.iterator(); iter.hasNext();) {
            Charset charset = (Charset)iter.next();
            if (charset.name().equals(charsetName))
                return charset;
        }
        for (Iterator iter = charsets.iterator(); iter.hasNext();) {
            Charset charset = (Charset)iter.next();
            if (charset.aliases().contains(charsetName))
                return charset;
        }
        return null;
    
public java.util.Iteratorcharsets()
{@inheritDoc}

        return charsets.iterator();