Package sun.io

Examples of sun.io.CharToByteConverter


    }

    public CharToByteConverter
        getFontCharset(final String charsetName, String fontName){

        CharToByteConverter fc;
        if (charsetName.equals("default")){
            fc = (CharToByteConverter)charsetRegistry.get(fontName);
        } else {
            fc = (CharToByteConverter)charsetRegistry.get(charsetName);
        }
View Full Code Here


        for (int i = 0; i < charSet.length && psFont != null; i++){

            /* Get the encoding of the run of text.
             */
            CharsetString cs = charSet[i];
            CharToByteConverter fontCS = cs.fontDescriptor.fontCharset;
            String charset;
            /*
             * CharToByteSymbol perhaps should return "symbol" for encoding.
             * Similarly CharToByteX11Dingbats should return "dingbats"
             * Forced to check for win32 & x/unix names for these converters.
             */
            if (fontCS instanceof CharToByteSymbol) {
                charset = "symbol";
            } else if (fontCS.toString().equals("WingDingsFontCharset") ||
                       fontCS.toString().equals("X11Dingbats")) {
                charset = "dingbats";
            } else {
                charset = makeCharsetName(fontCS.getCharacterEncoding(),
                                          cs.charsetChars);
            }

            String style = PlatformFont.styleStr(font.getStyle());

View Full Code Here

            int[] psFonts = getPSFontIndexArray(mLastFont, acs);
            if (psFonts != null) {

                for (int i = 0; i < acs.length; i++){
                    CharsetString cs = acs[i];
                    CharToByteConverter fontCS = cs.fontDescriptor.fontCharset;

                    StringBuffer nativeStr = new StringBuffer();
                    byte[] strSeg = new byte[cs.length * 2];
                    int len;
                    try {
                        len = fontCS.convert(cs.charsetChars, cs.offset,
                                             cs.offset + cs.length,
                                             strSeg, 0, strSeg.length);

                    } catch(CharConversionException e){
                        continue;
View Full Code Here

    }

    public CharToByteConverter
        getFontCharset(final String charsetName, String fontName){

        CharToByteConverter fc;
        if (charsetName.equals("default")){
            fc = (CharToByteConverter)charsetRegistry.get(fontName);
        } else {
            fc = (CharToByteConverter)charsetRegistry.get(charsetName);
        }
View Full Code Here

TOP

Related Classes of sun.io.CharToByteConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.