Exemple #1
0
        public BufferStream(int capacity, bool expandable, bool isLittleEndian)
        {
            ThrowHelper.ArgumentMustPositive((capacity < 0), nameof(capacity));

            this._buffer         = capacity != 0 ? new byte[capacity] : Array.Empty <byte>();
            this._writable       = true;
            this._expandable     = expandable;
            this._start          = 0;
            this._end            = 0;
            this._isLittleEndian = isLittleEndian;
            this._isOpen         = true;
        }