Ejemplo n.º 1
0
        /** 扩容 */
        private void grow(int len)
        {
            int cap = BytesUtils.getCapacitySize(len);

            if (cap > _buf.Length)
            {
                byte[] bs = new byte[cap];

                Buffer.BlockCopy(_buf, 0, bs, 0, _buf.Length);

                _buf = bs;
            }
        }