Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void
Exemplo n.º 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);
			}
		}