コード例 #1
0
        public void write(byte[] tmp, TemporaryBuffer os)
        {
            int ptr = tmp.Length;

            tmp[--ptr] = (byte)'\n';
            ptr        = RawParseUtils.formatBase10(tmp, ptr, _childCount);
            tmp[--ptr] = (byte)' ';
            ptr        = RawParseUtils.formatBase10(tmp, ptr, isValid() ? _entrySpan : -1);
            tmp[--ptr] = 0;

            os.write(_encodedName, 0, _encodedName.Length);
            os.write(tmp, ptr, tmp.Length - ptr);

            if (isValid())
            {
                _id.copyRawTo(tmp, 0);
                os.write(tmp, 0, Constants.OBJECT_ID_LENGTH);
            }

            for (int i = 0; i < _childCount; i++)
            {
                _children[i].write(tmp, os);
            }
        }