Exemplo n.º 1
0
 public void Reinitialize(int initialSize, int maxSizeQuota, int effectiveMaxSize, InternalBufferManager bufferManager)
 {
     Fx.Assert(!this.initialized, "Clear must be called before re-initializing stream");
     this.theMaxSizeQuota  = maxSizeQuota;
     this.maxSize          = effectiveMaxSize;
     this.theBufferManager = bufferManager;
     this.currentChunk     = bufferManager.TakeBuffer(initialSize);
     this.currentChunkSize = 0;
     this.totalSize        = 0;
     this.chunkCount       = 1;
     this.chunks[0]        = this.currentChunk;
     this.initialized      = true;
 }
Exemplo n.º 2
0
 public BufferedOutputStream(int maxSize)
     : this(0, maxSize, InternalBufferManager.Create(0, int.MaxValue))
 {
 }
Exemplo n.º 3
0
 public void Reinitialize(int initialSize, int maxSizeQuota, InternalBufferManager bufferManager)
 {
     this.Reinitialize(initialSize, maxSizeQuota, maxSizeQuota, bufferManager);
 }
Exemplo n.º 4
0
 public BufferedOutputStream(int initialSize, int maxSize, InternalBufferManager bufferManager)
     : this()
 {
     this.Reinitialize(initialSize, maxSize, bufferManager);
 }