Пример #1
0
        private void WriteStringOrReferenceId(String s)
        {
            int id = referenceCache.GetStringId(s);

            if (id != -1)
            {
                writer.WriteVarInt(id << 1);
            }
            else
            {
                referenceCache.AddString(s);
                UTF8Util.writeUTF(writer, s, true);
            }
        }
Пример #2
0
 public override void DirectWriteString(string str)
 {
     UTF8Util.writeUTF(writer, str);
 }
Пример #3
0
 public override void BeginWriteNamedObject(string objectName, int fieldCound)
 {
     writer.Write((byte)Datatypes.NAMEDOBJECT_DATATYPE_V1);
     UTF8Util.writeUTF(writer, objectName);
 }
Пример #4
0
 public override void WriteFieldName(string s)
 {
     UTF8Util.writeUTF(writer, s);
 }
Пример #5
0
 public override void WriteXML(XmlNode document)
 {
     writer.Write((byte)Datatypes.LONGXML_DATATYPE_V3);
     UTF8Util.writeUTF(writer, document.OuterXml, true);
 }