Append() public méthode

public Append ( int size ) : void
size int
Résultat void
Exemple #1
0
            public override void WriteBuffer(IList <ByteBuffer> buffers)
            {
                Fx.Assert(buffers.Count > 0, "buffers.Count should be set");
                int count = 0;

                foreach (ByteBuffer byteBuffer in buffers)
                {
                    count += byteBuffer.Length;
                }

                ByteBuffer bigBuffer = new ByteBuffer(count, false, false);

                foreach (ByteBuffer byteBuffer in buffers)
                {
                    Buffer.BlockCopy(byteBuffer.Buffer, byteBuffer.Offset, bigBuffer.Buffer, bigBuffer.Length, byteBuffer.Length);
                    bigBuffer.Append(byteBuffer.Length);

                    // Dispose incoming frame buffers since the caller is expecting us to release these objects
                    byteBuffer.Dispose();
                }

                base.WriteBuffer(bigBuffer);
            }
Exemple #2
0
            public override void WriteBuffer(IList<ByteBuffer> buffers)
            {
                Fx.Assert(buffers.Count > 0, "buffers.Count should be set");
                int count = 0;
                foreach (ByteBuffer byteBuffer in buffers)
                {
                    count += byteBuffer.Length;
                }

                ByteBuffer bigBuffer = new ByteBuffer(count, false, false);
                foreach (ByteBuffer byteBuffer in buffers)
                {
                    Buffer.BlockCopy(byteBuffer.Buffer, byteBuffer.Offset, bigBuffer.Buffer, bigBuffer.Length, byteBuffer.Length);
                    bigBuffer.Append(byteBuffer.Length);

                    // Dispose incoming frame buffers since the caller is expecting us to release these objects
                    byteBuffer.Dispose();
                }

                base.WriteBuffer(bigBuffer);
            }