예제 #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);
 }