private void WriteHexCharEntity(int ch)
{
byte[] chars = GetCharEntityBuffer();
int offset = maxEntityLength;
chars[--offset] = (byte)';';
offset -= ToBase16(chars, offset, (uint)ch);
chars[--offset] = (byte)'x';
chars[--offset] = (byte)'#';
chars[--offset] = (byte)'&';
WriteUTF8Chars(chars, offset, maxEntityLength - offset);
}