/// <exception cref="System.IO.IOException"></exception> internal virtual void Write(byte[] tmp, OutputStream os) { int ptr = tmp.Length; tmp[--ptr] = (byte)('\n'); ptr = RawParseUtils.FormatBase10(tmp, ptr, childCnt); tmp[--ptr] = (byte)(' '); ptr = RawParseUtils.FormatBase10(tmp, ptr, IsValid() ? entrySpan : -1); tmp[--ptr] = 0; os.Write(encodedName); 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 < childCnt; i++) { children[i].Write(tmp, os); } }