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); }
////////////////////////////////////////////////////////////////////////// // Charset ////////////////////////////////////////////////////////////////////////// static Charset.Encoder strBufEncoder() { if (m_strBufEncoder == null) m_strBufEncoder = new StrBufEncoder(); return m_strBufEncoder; }
protected OutStream() { m_charset = Charset.utf8(); m_charsetEncoder = m_charset.newEncoder(); }
public virtual void charset(Charset charset) { m_charsetEncoder = charset.newEncoder(); m_charset = charset; }
protected InStream() { m_charset = Charset.utf8(); m_charsetDecoder = m_charset.newDecoder(); m_charsetEncoder = m_charset.newEncoder(); }