encode() public abstract method

public abstract encode ( char ch, InStream @out ) : void
ch char
@out InStream
return void
Exemplo n.º 1
0
        private void writeXmlEsc(int ch)
        {
            Charset.Encoder enc = m_charsetEncoder;
            string          hex = "0123456789abcdef";

            enc.encode('&', this);
            enc.encode('#', this);
            enc.encode('x', this);
            if (ch > 0xff)
            {
                enc.encode(hex[(ch >> 12) & 0xf], this);
                enc.encode(hex[(ch >> 8) & 0xf], this);
            }
            enc.encode(hex[(ch >> 4) & 0xf], this);
            enc.encode(hex[(ch >> 0) & 0xf], this);
            enc.encode(';', this);
        }