Пример #1
0
            /// <summary>
            /// Override the base decode to decode and store the data from an input
            /// buffer. Recursively populates child nodes.
            /// </summary>
            ///
            /// <param name="inputBuf">position.</param>
            /// <param name="startIdx">The offset into the buffer.</param>
            protected internal override void decode(ByteBuffer inputBuf, int startIdx)
            {
                int idx = startIdx;

                size_ = decodeHeader(inputBuf, idx);
                idx  += header_.remaining();

                int accSize = 0;

                while (accSize < size_)
                {
                    DerNode node = net.named_data.jndn.encoding.der.DerNode.parse(inputBuf, idx);
                    idx     += node.getSize();
                    accSize += node.getSize();
                    addChild(node, false);
                }
            }
Пример #2
0
            public void updateSize()
            {
                int newSize = 0;

                for (int i = 0; i < nodeList_.Count; ++i)
                {
                    DerNode n = nodeList_[i];
                    newSize += n.getSize();
                }

                size_         = newSize;
                childChanged_ = false;
            }