public void Reinitialize(int initialSize, int maxSizeQuota, int effectiveMaxSize, InternalBufferManager bufferManager)
 {
     Fx.Assert(!_initialized, "Clear must be called before re-initializing stream");
     _maxSizeQuota     = maxSizeQuota;
     _maxSize          = effectiveMaxSize;
     _bufferManager    = bufferManager;
     _currentChunk     = bufferManager.TakeBuffer(initialSize);
     _currentChunkSize = 0;
     _totalSize        = 0;
     _chunkCount       = 1;
     _chunks[0]        = _currentChunk;
     _initialized      = true;
 }
 public BufferedOutputStream(int maxSize)
     : this(0, maxSize, InternalBufferManager.Create(0, int.MaxValue))
 {
 }
 public void Reinitialize(int initialSize, int maxSizeQuota, InternalBufferManager bufferManager)
 {
     Reinitialize(initialSize, maxSizeQuota, maxSizeQuota, bufferManager);
 }
 public BufferedOutputStream(int initialSize, int maxSize, InternalBufferManager bufferManager)
     : this()
 {
     Reinitialize(initialSize, maxSize, bufferManager);
 }